Get Header Data of Flat File
hi everyone!i am currently creating a package which involves getting data from CSV files. i can successfully get the data from the files, my problem is, i need to get data from the header of the CSV files. i am currently skipping the header rows. the format of the CSV files is as follows:-----------------------------------------------------------------------------------Date, 20070704Store Code, storeCode1data row.....data row.....data row.....-----------------------------------------------------------------------------------technically, i also need the date from the header row, but since it is also indicated in the data rows, i have no problem with that. what i need is the Store Code, which is not indicated on the data rows. i need to store the data in a database in the following format:-----------------------------------------------------------------------------------StoreCode Date column1 column2 column3 ......storeCode1 20070704 ...storeCode2 20070704 ...storeCode3 20070704 ...-----------------------------------------------------------------------------------any idea how SSIS can handle this? thanks a lot!
July 4th, 2007 6:33am

You'll need to read thefile in as a single-column file. Then use a conditional split to create 2 data paths, one with the header rows and one with the detail rows. Thereafter you'llprobably use a derived column component toparse out the individual columns. -Jamie
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2007 6:47am

Jamie, i'll try your suggestion. thanks a lot!
July 4th, 2007 7:03am

How can i do that in condition split? I have ready flat file as one big column. When i open condition split task, i see only one column... so i get confused now.. what is next step. Thanks, shalin
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2011 11:48am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics