Wednesday, March 21, 2012

Name Flat file at run time

Hi,

I create a flat file in my package using Dataflow task and then I need to send that text file on some FTP site but the problem I am facing is I need to generate file name at run time like file name should be like "abc.yymmdd.txt" where yymmdd are Year,month and date.

Is there any way to give name to a flat file?

Thanks,

Pooja

your Connection Manager has a Property Collection called Expressions. Expand that, and set the ConnectionString to a variable expression.|||

"ABC." + (DT_WSTR,8) ( (YEAR(@.[User:Big SmileateTimeVar]) * 10000) + (MONTH(@.[User:Big SmileateTimeVar]) * 100) + DAY(@.[User:Big SmileateTimeVar]) ) + ".TXT"

Change the variable reference (@.[User:Big SmileateTimeVar]) to GETDATE() if you want today's date to be used.

sql

No comments:

Post a Comment