• BenWard (12/29/2014)


    Ah yes I did mean columns.

    silly mistake there!

    In that case, BCP will still work. You need to list the columns in your format file and give them the column position of "0", empty delimiters, and an input length of "0".

    The other thing you might try is to BCP into a view that refers to the table. Of course, the view can be setup to have the columns in the same order as the file and you only need to list the columns that will be in a file. This won't, of course, work if you need to skip any columns that are in the file itself.

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