I realize this may be a simple question. And, I hope you can help me with this.
I currently run data files every day, and these files are spooled into a folder with typical file names. "letterout.txt" , "fulfillment.txt" , etc.
Like so:
spool Y:\Back_UP\Letters\letterout.txt
(data extract)
spool off
However, in my recent efforts to send these files via FTP, the customer requires the system dates to be attached to the filename. And unfortunately, I don't know how to do this using the SQL code.
How do I create a file name with the sysdate included? Example: letters04162004.txt OR fulfill0419.txt
Do I have to spool the file first and then rename the text file? Or can the filename be created in advance, when the data is spooled to the folder location?
I'm still fairly new to SQL and have not been able to find any references in the books I have. Any assistance you can provide would be very helpful! Thanks!
Sincerely,
KyraVald
(KyraVald@hotmail.com)
I currently run data files every day, and these files are spooled into a folder with typical file names. "letterout.txt" , "fulfillment.txt" , etc.
Like so:
spool Y:\Back_UP\Letters\letterout.txt
(data extract)
spool off
However, in my recent efforts to send these files via FTP, the customer requires the system dates to be attached to the filename. And unfortunately, I don't know how to do this using the SQL code.
How do I create a file name with the sysdate included? Example: letters04162004.txt OR fulfill0419.txt
Do I have to spool the file first and then rename the text file? Or can the filename be created in advance, when the data is spooled to the folder location?
I'm still fairly new to SQL and have not been able to find any references in the books I have. Any assistance you can provide would be very helpful! Thanks!
Sincerely,
KyraVald
(KyraVald@hotmail.com)