Link to home
Start Free TrialLog in
Avatar of Accounts Payable
Accounts PayableFlag for United States of America

asked on

Exporting SQL Data - Naming CSV Export File

Hello Exports,

I have a SSIS package created to export SQL Server 2012 data to a flat CSV file. I'm running the package using SQL Server Agent job. Everything works as anticipated and the data is exported. However, the file is stored as test.CSV and when the job runs the second time, the package overwrites the existing file.

Another application is picking up this CSV file and if it did not pick up this file before the SQL job runs the next time - the data will be lost. Is there a way I can specify file name, like current datetime (so it creates unique file names) when stored the CSV file on the screen attache below (see image)?

Please let me know how I can avoid this.

Thanks.User generated image
ASKER CERTIFIED SOLUTION
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Accounts Payable

ASKER

Idk how I missed it. Thanks for pointing it out. I will test it and will let you know if needed.