Having trouble with a BCP statement

  • frederico_fonseca wrote:

    itmasterw 60042 wrote:

    @Jeff - Server is optional - if not supplied it run on the local machine where bcp is executed and connects to its default instance.

    But doing this is bad practice and should be avoided

    Agreed... that's why I stated it the way I did.  I've seen enough people (including myself in the early days) have issues that I don't consider it to be optional and didn't want the OP to think it was.   He's also going to need to cite which database he wants the code to run in or make the possible mistake of using 3 part naming, as well, for the same reason... defaults change.

    --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 post 16 (of 15 total)

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