LMSouq
database Open

mySQL :: insert into table, data from another table?

HA
Hailwood
1 month ago
3 views
Problem Description
I was wondering if there is a way to do this purely in sql: q1 = SELECT campaign_id, from_number, received_msg, date_received FROM `received_txts` WHERE `campaign_id` = '8'; INSERT INTO action_2_members (campaign_id, mobile, vote, vote_date) VALUES(q1.campaign_id, q1.from_number, q1.received_msg, q1.date_received); <strong>Note: </strong>q1 would return about 30k rows. Is there any way to do what I am attempting above in straight sql? To just pull the data straight from one table (basically a raw data table) and insert into another table (basically a processed data table)?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base