• SQListic (4/18/2014)


    Hi All,

    I The requirement is to unload all columns data into csv file using bcp with pipe delimitter, but the condition is to remove milliseconds part of a datetime column.

    Ex:

    2014-02-19 17:12:14.967 remove .967 from data while unloading into csv.

    So write a view that shows the output you want and BCP from that.

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