Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL append query to use date stamp?

Status
Not open for further replies.

shermy448

MIS
Apr 19, 2006
2
IE
Hello,

I have tables date stamped every day EG. TABLE20060403
Is there a way in sql to append to a master table using todays date in the query ?
My current query is :

INSERT INTO table1
SELECT TABLE20060403.*
FROM TABLE20060403;

which I have to change manually every day.

Tks
shermy448
 
Do it in VBA:
DoCmd.RunSQL "INSERT INTO table1 SELECT * FROM TABLE" & Format(Date, "yyyymmdd")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top