SQL Server 2005 SSIS - How to get special information from the first line of a file -


say have text file looks this:

date 1/1/2010 a,b,c a,b,d ... 

i want import table looks this:

1/1/2010,a,b,c 1/1/2010,a,b,d ... 

what elegant way that?

my best idea far use data flow package, , use flat file source read in file (ignoring first line) , load table. when complete, have script task open file again, read out date, pass date sql task update table date.

but surely there less convoluted way?

i extract date package datetime variable. then, use data flow extract data mentioned. after within same dataflow, use derived column tranformation add date variable buffer loaded table. it's similar had in mind but, requires 1 less open , close db connection created , disposed using sql task.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -