Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: export to csv using t-sql

    Debbie,

    Here is a TSQL code snippet which might help;

    DECLARE @bcpResult INT

    DECLARE @bcpCommand

    NVARCHAR(4000)

     SET @bcpCommand = 'bcp select * from Accounts queryout c:\temp\test.csv -U username -P password -c'

     

     -- Export to CSV 

     EXEC @bcpResult...

Viewing post 1 (of 1 total)