issue: Inserting csv file - demiliter '','' - comments columns with '','' !??

  • Hi,

    I've a .csv file and I want to import it into a table on SQL Server 2005.

    The columns in the file are delimited with commas ','

    My issue is that in a few comments columns, the user may have entered a comma within his string.

    Do you have an idea how I can cope with that? How to say to Integration Services: 'Insert this file where columns are delimited by commas but be carefull when there's a comma in a comment field???'

    Any help much appreciated,

     

    Chris

  • Any way you can get the text quoted with "" or something similar? Perhaps have it generated with a different delimited (tab or pipe)?

    If not, I don't think there's much you can do with it other than using a Ragged-Right transform and dealing with bad data. Make a table with enough columns to insert the data and insert into that or something similar.

    I guess you could insert by inserting and then splitting the fields, but I don't think you want to do that either.

    If someone has some real-world experience and has done this successfully without changing the source file, please share.

    -Pete

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

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