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 |
charliebrown
Starting Member
4 Posts |
Posted - 2013-02-08 : 08:18:55
|
Hello, I am a real noob at SQL programming and was wondering if someone could tell me how it would be possible for me to have my sql script output to a txt file?For example the sql script file I have saved is select * from abc.def:1. How can I automate the output to a txt file?2. How can I run the script from a command line since I am doing this now from SSMS.Thank you! |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2013-02-08 : 08:20:18
|
Read about BCP in SQL Server help fileMadhivananFailing to plan is Planning to fail |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-08 : 09:07:07
|
you've multiple options1. bcp2. OPENROWSET3. SSIS export import1 and 3 (using dtexec) can be executed from command line------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
charliebrown
Starting Member
4 Posts |
Posted - 2013-02-08 : 09:13:06
|
I took a look at bcp and wow that looks pretty hard. |
|
|
|
|
|