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 - 2006-02-14 : 08:29:09
|
farai writes "How do I save the output of an sql query to a file (and give it a name) in command i.e without using the save output to file(execute mode) graphical user interface, I also want to send the created file by email as an attachment." |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-14 : 08:32:31
|
Use bcpExec Master..xp_Cmdshell 'bcp "Select columns from DBName..TableName" queryout "C:\results.txt" -c'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|