How to save output of a Select query to a .json file or .txt file?using MSSQL Server
Table A contains id,name,address
I tried the query below,
SELECT * from A INTO OUTFILE '/tmp/orders.txt';
but it produced an Error,
SQL Error [156] [S0001]: Incorrect syntax near the keyword 'INTO'.
Incorrect syntax near the keyword 'INTO'.
How do i resolve the error?. Even if it's only possible to store the data in a .txt file, it will be okay.
Thanks in advance.