txt file with date


i have text file need import. text file named '20090930_virtual_daily_extract_test_delimited.txt'

my first step - using ssis package, need to strip out date (20090930) convert (2009-09-30) , insert date field.

i'm new ssis , have no idea how this...
qeqw

take filename in variable filename (may inside foreach loop or passing value)
then take 1 more variable date_filename , set evaluate expression property true.
write expression like:
substring(@[user::filename],1,4) + "-" + substring(@[user::filename],5,2) +
 "-" substring(@[user::filename],7,2)

then use variable in derived column create column.


nitesh rai- please mark post answered if answers question


SQL Server  >  SQL Server Integration Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........