Hi y'all
I'm trying to use a SQL SELECT INTO statement to back up the table tblContactImport into a new table with the same name albeit with today's date stuck on the end :- for example if I ran the query to back up tblContactImport today, then I would like the new table to be called tblContactImport_07/11/2016. I thought the syntax would be thus:-
SELECT * INTO "tblContactImport_" & Date()
FROM tblContactImport;
But I just get a "Syntax error in query. Incomplete query clause" message.
So I tried :-
SELECT * INTO ("tblContactImport_" & Date())
FROM tblContactImport;
and just got a different error message "the SELECT statement contains a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect".
Can anybody tell me whether what I wish to achieve is possible in an SQL query and if so what the correct syntax would be.
Ta very much.
I'm trying to use a SQL SELECT INTO statement to back up the table tblContactImport into a new table with the same name albeit with today's date stuck on the end :- for example if I ran the query to back up tblContactImport today, then I would like the new table to be called tblContactImport_07/11/2016. I thought the syntax would be thus:-
SELECT * INTO "tblContactImport_" & Date()
FROM tblContactImport;
But I just get a "Syntax error in query. Incomplete query clause" message.
So I tried :-
SELECT * INTO ("tblContactImport_" & Date())
FROM tblContactImport;
and just got a different error message "the SELECT statement contains a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect".
Can anybody tell me whether what I wish to achieve is possible in an SQL query and if so what the correct syntax would be.
Ta very much.