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'.