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 |
|
rjackman1959
Yak Posting Veteran
60 Posts |
Posted - 2009-01-30 : 15:33:30
|
| I there a way to save or concatenate the output of a select statement to a fixed length test file on the local PC? Here is the output. Thank You in advance20090107 4915A 3758UPTC 7498 00000131 720576 20081231 00000344 00000001016620090112 4930A 3758UPTC 7502 00000131 720587 20081231 00000344 000000010172 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-01-30 : 15:41:37
|
| one way is to go to: Tools | Options | Query Results | Sql Server | Results to TextChange the options accordingly then change the query properties to "output to file". When you execute the statement you will get a Save File dialogue where you can browse to your local directory.Be One with the OptimizerTG |
 |
|
|
rjackman1959
Yak Posting Veteran
60 Posts |
Posted - 2009-01-30 : 16:06:12
|
| Is there a way to do this on only select queries? I am call this procedure from an Excel speadsheet. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
rjackman1959
Yak Posting Veteran
60 Posts |
Posted - 2009-01-30 : 16:55:41
|
| Sorry TaraWhat command line? I am not familiar with bcp. Also I understand what the SomeFile.csv and Ssomeserver, but I don't know what the someinstance is. Please excuse my inexperience |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-31 : 08:07:33
|
quote: Originally posted by rjackman1959 Sorry TaraWhat command line? I am not familiar with bcp. Also I understand what the SomeFile.csv and Ssomeserver, but I don't know what the someinstance is. Please excuse my inexperience
or just use sql export import wizard with text file as destination and your query as source to get data into file. |
 |
|
|
|
|
|