Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Flat file destination file name

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2009-10-15 : 12:33:41
Dear All,
I am dumping the data from Table to .CSv file by using the flat file connection manager as destination.
I am doing this everyday,hence i need to change the filename dynamically as 07UI(Todaydate).csv.

Please guide me how can we do this.

Thanks,
Gangadhar

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-15 : 15:43:51
You can create an expression with the filename and date.
This link gives a step-by-step guide: http://www.sqlnerd.com/ssis_dynamic_dates.htm


@[User::filepath] +
(DT_STR,4,1252) DatePart("yyyy",getdate()) +
Right("0" + (DT_STR,4,1252) DatePart("m",getdate()),2) +
Right("0" + (DT_STR,4,1252) DatePart("d",getdate()),2) + ".csv"
Go to Top of Page

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2009-10-16 : 05:22:10
Thank you very much it helped me a lot.
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-16 : 06:45:01
You're welcome. Glad I could help.
Go to Top of Page
   

- Advertisement -