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 |
|
AClb55
Starting Member
3 Posts |
Posted - 2011-07-20 : 14:52:23
|
| In SSMS 2008, I am running a query and I need the results to be a tab delimited text file. I have figured this step out already, but I am wondering if there is a way to get there results automatically saved into a text file. I have done searches but I can not find a detailed description of how to do this and how it works. Thanks. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-07-20 : 14:56:02
|
| The bcp command line utility is perfect for this kind of thing: http://msdn.microsoft.com/en-us/library/ms162802.aspxYou can also use sqlcmd to create an output file, you have to tweak it to use tabs though: http://msdn.microsoft.com/en-us/library/ms162773.aspx |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-07-20 : 15:01:11
|
Blame the kids. Or the job, whichever is most distracting. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|