Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 709
  • Last Modified:

SQL 2005 SSIS dynamic name for flat file export

I've got a SSIS package which extract data from a table and writes it to a flat text file nightly. I need the resultant file name to include the date it was extracted in the format YYYYDDMM

i.e. today's file would be called: Flat_file_20091507.txt

How do I ammend the SSIS package to dynamically name the file and what expression do I need to use to produce the date in this format?
0
Christie_M
Asked:
Christie_M
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
this might help to get this done, using variables:
http://www.mssqltips.com/tip.asp?tip=1395
0
 
Chris LuttrellSenior Database ArchitectCommented:
Here is the example you want to follow (look for this section a little over half way down the page):
"Here is an example of creating a dynamic flat file connection in SSIS. Let's say that every morning we load a textfile from the Receiving Department's network share into a database (for this we will use C:\backups\). The file is always processed the day after the receiving process and is named "DataLoad"+"month"+ "day"+"year.txt" (i.e., DataLoad10112006.txt). We are setting up an SSIS package that retrieves the data from the file and moves it to the database."
http://www.mssqltips.com/tip.asp?tip=1084
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now