SQL Server Agent job running query only sends half of the results to file

  • The code I'm running is

    SELECT * FROM GATE.dbo.DATAFLOW WHERE RAW LIKE 'AAA|E0000000|_|'+CONVERT(VARCHAR(8),GETDATE(),112)+'%ECP%'

    I'm currently trying to do this using BCP -

    BCP

    "SELECT * FROM GATE.dbo.DATAFLOW WHERE RAW LIKE 'AAA|E0000000|_|'+CONVERT(VARCHAR(8),GETDATE(),112)+'%ECP%'"

    QUERYOUT "test.csv" -c -t, -S server -T

    But I'm getting error -

    Msg 102, Level 15, State 1, Line 4

    Incorrect syntax near 'QUERYOUT'.

Viewing post 16 (of 15 total)

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