How to import csv file with some coditions in SSIS ?

  • Hi ,

    I am importing a csv file wihich is not delimited by anything ..means when i define the flat file connection manager i see the all the data coming in single column . the file contains some abrupt data also like ** , space,hyphen,. I want to fragment thos data based on some condition like from position 1 upto length 7 it should go in 1 col. then from pos 8 to 12 in another col and like wise .There should be in all 10 dotAfter fragmanting this data i need to insert this in Sql server tables stating conditions that if data contains " . " then dont insert or insert only rows when not empty .

    Can this be done using temp tables ?

    I am finding very difficult to work this out .

    Can anybody help me ...

    Regards

    Aditi

  • Hi..

    Use script task to solve this,write .net code for this .

    Regards..
    guru12

  • If there is no delimiter, it is, by definition, not a CSV file.

    It's a fixed-width file and you can use SSIS to import it and break it into its constituent fields by defining it as such.


  • Hi ,

    Thanks Phil .

    U are right. Its a fixed width file and i used ragged right format to exactly define the width of the column .

    The problem is solved.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply