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 |
|
dav101
Starting Member
10 Posts |
Posted - 2004-06-02 : 12:33:15
|
| The following code fails when I run it in QA but if I copy and paste into the DOS window it works. Has me stumped. Any Ideas that I'm missing?? The file is not created.SET @EXPORTSQL='bcp "Select sData from jeff.dbo.ccarout order by Lno" queryout c:\Oshea.txt -c -S"homeSrv" -U"username" -P"password"'EXEC MASTER..XP_CMDSHELL @EXPORTSQLThis is the grid resultsNULLStarting copy...NULL1 rows copied.Network packet size (bytes): 4096Clock Time (ms.): total 1NULLMike |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-06-02 : 12:55:26
|
| When you run it in Query Analyzer, it is executing on the database server and not on your client machine. The file is being created on the database server.Tara |
 |
|
|
dav101
Starting Member
10 Posts |
Posted - 2004-06-02 : 13:04:13
|
| Tara,Thankyou,Thankyou,ThankyouMike (aka the dum one)Mike |
 |
|
|
|
|
|