Hi everyone,
I have a Make table query that looks like this:
Select *
INTO tblFinalOneLine113001
FROM tblFinalOneLine
This is part of a very large stored procedure. Currently I manually type in the date as part of the INTO clause to create a backup copy of the Month before. What I would like to do is have the date automatically entered as part of the INTO clause so that it looks something like this:
Select *
INTO tblFinalOneLine GETDATE()-30
From tblFinalOneLine
Is it possible to have a calculation as part of the INTO clause? If so can you give me the correct syntax. Can't seem to figure this one out.
Thanks for all your help in advance.
Cathy
I have a Make table query that looks like this:
Select *
INTO tblFinalOneLine113001
FROM tblFinalOneLine
This is part of a very large stored procedure. Currently I manually type in the date as part of the INTO clause to create a backup copy of the Month before. What I would like to do is have the date automatically entered as part of the INTO clause so that it looks something like this:
Select *
INTO tblFinalOneLine GETDATE()-30
From tblFinalOneLine
Is it possible to have a calculation as part of the INTO clause? If so can you give me the correct syntax. Can't seem to figure this one out.
Thanks for all your help in advance.
Cathy