Create a csv file, import data and add filename dynamically

  • Help ..

    I am using SQL Server Data Tools and I am attempting to create a new csv file, import data to it and then add the filename Bensfile[Date].csv.

    I have been able to export the data to an existing csv but I'm unable to create a new csv file and rename the file name so it includes the date.

    So far in my SSIS package I have added a Data Flow Task. Within this there is an OLE DB Source and and a Flat File destination.

    Please can anyone help me perform the following:

    i) how I create the new csv and add data to the file

    ii) Rename the file so it includes the date

    Many Thanks

  • You have to use an expression builder to create the file name and assign it to the CSV connection manager. Then you can assign the particular file name with date when it is created. See this link.. http://www.sqlnerd.com/ssis_dynamic_dates.htm

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply