BULK INSERT & Text Qualifier

  • Jeff Moden (1/18/2008)


    Delimiter of "," (including the quotes) is perfect for "real" CSV instead of "comedy separated values".

    Delimiter of "," is as good as '[' + @TableName + ']'.

    Works almost every time.

    But it's better to use QUOTENAME. Because it deals properly with quotes inside of the variable.

    _____________
    Code for TallyGenerator

  • Dear All,

    I am also faced the same problem mentioned above, using CSV file bulk upload with [ " ] as a Text Qualifier. Any one have a solution.

    I am waiting......

    Thanks

    Prabu

  • Ummm... the answer is actually near the beginning of this thread. Instead of waiting, read the rest of the thread.

    --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)

  • Alternatively you could just do a find and replace on the original file and get rid of them that way.

    I just did because the whole thing was driving me towards an even deeper insanity

  • Richard Hurst (3/10/2009)


    Alternatively you could just do a find and replace on the original file and get rid of them that way.

    I just did because the whole thing was driving me towards an even deeper insanity

    Using which tool, Richard?

    --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)

  • Hi

    Take your pick really - I suppose it depends how you are wanting to do it

    interactive

    Notepad

    Notepad++

    batch

    sed for Windows

    I have used them all at one time or another.

    I have to say I like sed but then my background is in Unix - so I would

    Regards

    Richard

  • What worked for me was changing

    ROWTERMINATOR = '\n'

    to

    ROWTERMINATOR = '0x0a'.

Viewing 7 posts - 16 through 21 (of 21 total)

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