G
George
I use the following query to generate a list of addresses to mail to. I'd
like to be able to put the creation date into the name of the table (e.g.
INTO [20080815 FCP S1 Postcards to Send].) I realize I could do this
manually every time I run it, but I'd like to be able to do it
programatically. If this is possible, could someone give me a pointer as to
how to accomplish this? I want to be able to create the table name at run
time.
SELECT [GES].[ID], [GES].[CaseID], [GES].[Account], [GES].[OwnerName],
[GES].[PropAddr], [GES].[MailAddr1] AS Address1, [GES].[MailAddr2],
[GES].[MailCity], [GES].[MailState], [GES].[MailZIP], [GES].[DtUpdated],
[GES].[DtAdded], [GES].[DtLtrSent], [GES].[DocStatus], [GES].[EstSellDate]
INTO [FCP S1 Postcards to Send]
FROM GES
WHERE ((([GES].[DtLtrSent])=Date()) And (([GES].[DocStatus])="S2"))
ORDER BY [GES].[ID];
like to be able to put the creation date into the name of the table (e.g.
INTO [20080815 FCP S1 Postcards to Send].) I realize I could do this
manually every time I run it, but I'd like to be able to do it
programatically. If this is possible, could someone give me a pointer as to
how to accomplish this? I want to be able to create the table name at run
time.
SELECT [GES].[ID], [GES].[CaseID], [GES].[Account], [GES].[OwnerName],
[GES].[PropAddr], [GES].[MailAddr1] AS Address1, [GES].[MailAddr2],
[GES].[MailCity], [GES].[MailState], [GES].[MailZIP], [GES].[DtUpdated],
[GES].[DtAdded], [GES].[DtLtrSent], [GES].[DocStatus], [GES].[EstSellDate]
INTO [FCP S1 Postcards to Send]
FROM GES
WHERE ((([GES].[DtLtrSent])=Date()) And (([GES].[DocStatus])="S2"))
ORDER BY [GES].[ID];