Trivial bit of SQL help needed

PiedPiper70

Registered User.
Local time
Today, 08:34
Joined
Oct 21, 2012
Messages
115
I have a line like this:
strSQL = INSERT INTO tbl1 SELECT * FROM tbl2
followed by db.execute strsql, dbFailOnError

This works fine but I'd like use a couple of variables for the table names so I can loop through lots of tables. I can't get the syntax right - can someone help please?

Thanks
Dave
ps I'm trying to fill an empty table (tbl1) with the entire contents of another (tbl2)
 

Users who are viewing this thread

Back
Top Bottom