none
Ignore comma between double quotes RRS feed

  • Question

  •  Situation:


    I developed a package which imports .csv file s into my database, on a daily basis. These .csv files are snapshots of tables that are provided to me by a 3rd party.  The only delimiter that I can use is a comma because I have no control over the other company’s export function.


    The errors arise due to the fact that some of the text fields that I import have commas in them, however when this occurs there is always double quotes surrounding the text that has a comma.


    Is there a way to ignore commas which are between  double quotes during the import process?

     

    Thanks

    Garrett

    Monday, June 23, 2008 6:48 PM

Answers

All replies

  • How about using double quote as text qualifier?

     

    Let us know if this works for you.

     

    Monday, June 23, 2008 7:00 PM
  • Garret,

     

    I had same thing and  told them to seperate fields with tab so it was OK then

     

    Monday, June 23, 2008 7:01 PM
  •  Jerkus wrote:

    Garret,

     

    I had same thing and  told them to seperate fields with tab so it was OK then

     



    In my case tab delimited files would work great but I am unable to convince the 3rd party to make those changes to their export function.


    Monday, June 23, 2008 7:07 PM
  •  SQLUSA wrote:

    How about using double quote as text qualifier?

     

    Let us know if this works for you.

     



    Not all of the text fields use the double quotes, just the text fields with a comma in the text have double quotes but I will use the Advanced Editor to set the text delimiter to double quotes and see what happens.


    Monday, June 23, 2008 7:14 PM
  •  SQLUSA wrote:

    How about using double quote as text qualifier?

     

    Let us know if this works for you.

     



    Thanks!

    Using  double quotes in the Text Qualifier of the Flat File Connection Manager Editor worked great.

    The .csv are still imported correctly into the database but now there are no problems with having a comma in the text fields.

    Monday, June 23, 2008 10:24 PM