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 |
|
mikejohnson
Posting Yak Master
153 Posts |
Posted - 2004-12-14 : 10:08:27
|
| when running the following code in my job, it seems it runs twice. but when calling the sp, everything works fine only once. what's the deal?declare @filename varchar(200)select @filename = 'D:\Inetpub\ACHFiles\avantis\ACH' + convert(varchar(10),getdate(),12) + '.txt'declare @cmd varchar(2000)select @cmd = 'bcp "exec interadworks..spGetAchFileContent" queryout "' + @filename + '" -c -S"server" -U"user" -P"pass"'exec master..xp_cmdshell @cmd |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-12-14 : 10:40:10
|
| Suspect your code is running it twice.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-12-14 : 11:31:05
|
| Please do not cross post:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=43695 |
 |
|
|
|
|
|