RÍO GRANDE

  • I've lost my mind...

    I have data in a file that looks like this...

    RÍO GRANDE

    When I import it into a table using Bulk Insert, it comes out looking like this...

    R-O GRANDE

    I've tried different code page collations (SQL_AltDiction_CP850_CI_AI and SQL_Latin1_General_CP850_CI_AI) but no luck...

    What am I doing wrong?

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

  • Jeff,

    Have you tried an accent sensitive collation?

    😎

  • No... didn't think that would matter... Thought that was just for compares. I'll give it a try.

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

  • Try using BULK INSERT.... WITH (CODEPAGE='RAW')?

    Seems to work for me (from a cut and paste from your post).

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Great... I'll give that a try... Thanks, Matt.

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

  • Well, I'll be dipped... that did it, Matt. Thanks a load :w00t:

    --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'll have to remember that as well. Didn't have time to do any testing, had an unscheduled meeting.

    😎

  • I usually am "dipped" in it by this time of day....and it ain't smelling pretty today....

    Glad that helps!

    One warning though - it seems to do some interesting things when you try to shove that into a nvarchar() field as opposed to a varchar....so beware. I am seeing the infamous "I don't know what this is" square you get when the font doesn't understand it.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Roger that... heh, yeah, ran into the NVARCHAR thing you speak of which, of course, didn't work worth a hoot. Pretty much squared away, now. Thanks again for the help, Matt! Just wouldn't have thought of trying the "RAW" code page trick.

    And thanks for trying, Lynn... Every bit of information helps... especially this time of day when the vultures are circling with little signs that say "Ya done yet?" 🙂

    --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 9 posts - 1 through 8 (of 8 total)

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