The_Hitcher
asked on
VBA for Access - Loop and Insert Into based on results
Morning all
I want to extract a set of records from table A (four fields - one integer, two dates and a string), and then loop through the results and insert them into table B. I'm not too sure of the best way to go about this and the syntax.
Please can someone advise.
Thanks
I want to extract a set of records from table A (four fields - one integer, two dates and a string), and then loop through the results and insert them into table B. I'm not too sure of the best way to go about this and the syntax.
Please can someone advise.
Thanks
INSERT INTO table2
SELECT field1int, field2date, field3date, field4str FROM table1
WHERE {conditions}
SELECT field1int, field2date, field3date, field4str FROM table1
WHERE {conditions}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
One more thing: make sure that table2 has 4 columns:
INSERT INTO table2
SELECT field1int, field2date, field3date, field4str FROM table1
WHERE {conditions}
You didn't like the pure SQL solutions? Just checking.
No code is required.