• ben.brugman (5/13/2016)


    From within the SQL environment (say a stored procedure) I would like to output the result from a select to a file on disk.

    I know this is possible using xp_CmdShell, but the target system does not allow this.

    How can I achieve this from within a stored procedure ?

    Thanks,

    Ben

    Maybe EXEC task in a job?

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