May 15, 2012 at 7:10 am
In MS SQL 2008 is there an equivalent to the MySQL command :
SELECT * FROM test_tbl
INTO OUTFILE 'c:/out.csv'
May 15, 2012 at 7:15 am
if you are using SSMS, you can just choose "Results to" --> Results to File. you right click on the TSQL window to see that.
or, you use sqlcmd
sqlcmd -Q "SELECT * FROM test_tbl" -o MyOutput.txt
March 14, 2014 at 12:57 am
HI,
without any manual interaction, i want to save a query output a text/csv file in my SQL database
Example:
SELECT * FROM ORDERS -- which is returning 25 rows
i want save these 25 records as a text/csv file as a stream in another table at back end only.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy