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 2008 Forums
 SSIS and Import/Export (2008)
 expression

Author  Topic 

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2014-02-26 : 22:40:25
i have a file in folder with the name FILENAME_yyyymmddhhmmss.txt
i would like to grab the file and insert into table.
how can i grab the file due to the hhmmss, the seconds part always change value on timespam.

"FILENAME_"+
(DT_WSTR,4)YEAR(GETDATE())
+ RIGHT("0" + (DT_WSTR,2)MONTH(GETDATE()), 2)
+ RIGHT("0" + (DT_WSTR,2)DAY( GETDATE()), 2)
+ ".txt"
   

- Advertisement -