How to ignore the comma seperator inside ","

  • I am using , seperated file to load the data.

    Data contain comma inside "".

    while inserting comma iside quotes are also seperted and insert as a seperate column.

    123,"12,car st,pune,india",600 290,IND

    How to ignore the comma inside ","

    Thanks

  • I am not sure what tool you are using, so I won't be specific.

    There should be an option in your tool to set a "Text Qualifier" and you will want to set that to ".

    HTH

  • If it's BCP or Bulk Insert or maybe even the Bulk Insert task of SSIS, you may need a format file to do this...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thanks..

    I am using BULK INSERT in that i had specified ROW TERMINATOR & FIELD TERMINATOR only.

    How to specify a TextQualifier?

    I had used format file also.

  • sharma (6/21/2008)


    Thanks..

    I am using BULK INSERT in that i had specified ROW TERMINATOR & FIELD TERMINATOR only.

    How to specify a TextQualifier?

    I had used format file also.

    To the best of my knowledge, you can't... you need to use a BCP Format File along with the Bulk Insert. It's not hard to make... look it up in BOL.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I am also facing the same problem...Pls help

  • Like I said... Books Online... lookup BCP Format file. I can't help if you don't even know what I'm talking about. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

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