SQL Server Performance Forum – Threads Archive
save query result in a fileIf I want to save the output of
"select * from <table>" in C:/file.txt then what will be the store procedure? Thanks,
you can use SQLCMD of OSQL with -o switch sqlcmd -q"Your query" -o"your output filename" read more about these command in BOL Madhu
You can use BCP too…
Check BOL for syntax…
SQL-Server-Performance.com All postings are provided â€œAS ISâ€ with no warranties for accuracy.