Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-12-03 : 08:33:21
|
| writes "Can I save/transfer resultset returned from a stored procedure to a text file? If yes , how?" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2001-12-03 : 09:10:56
|
| You can use DTS or bcp to import and export data to text files. Books Online details both methods. You can export to fixed-width or delimited file formats (comma, tab, whatever). Be wary of using a comma-delimited format if your data contains embedded commas; you should use another, non-data character as your delimiter. |
 |
|
|
shankarc
Starting Member
37 Posts |
Posted - 2001-12-03 : 09:31:04
|
| If you are using SQL2000 then in the query analyser there is an option to achieve this. In the Query menu, choose the "Results to File" option and then run the proc. This option will ask for a filename(to save the results) when you run the Procedure. |
 |
|
|
|
|
|