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 |
|
marimarthe
Starting Member
1 Post |
Posted - 2005-08-23 : 05:48:27
|
| I want to do a SQL sentence that saves the results from the select in a .txt file. I get the results as a long list on the screen, and it repeats the headers several times, so it takes quite some time to copy the results out of there. It would be better if the result was put as a list directly in to a text file.Anyone know how I can do that? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-23 : 06:08:22
|
| Try thisExec master..xp_cmdShell 'bcp "Select columns from DBname..TableName" queryout "C:\test.txt" -c'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|