Trivial bit of SQL help needed (1 Viewer)

PiedPiper70

Registered User.
Local time
Today, 16:07
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)
 

PiedPiper70

Registered User.
Local time
Today, 16:07
Joined
Oct 21, 2012
Messages
115
Self sorted, thanks
 

Users who are viewing this thread

Top Bottom