![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, In a DTS package, I have a SQL Task - see below... EXEC xp_cmdshell ? I'm trying to pass a parameter from a global variable into my SQL statement, but it won't let me add a parameter and returns syntax error. I have also tried 'EXEC xp_cmdshell ?,?' as there are two unnamed parameters for xp_cmdshell, but it does not like this either. Any Ideas? Ta Paul |
#3
| |||
| |||
|
|
Hello Paul, So you want to call xp_cmdshell inside DTS and pass in params. What are you doing with xp_cmdshell? would you be better off using the ExecuteProcess task? http://www.sqldts.com/default.aspx?251 If you do want to use xp_cmdshell but pass in params then you can do it using a variation of the following http://www.sqldts.com/default.aspx?205 Allan Hi, In a DTS package, I have a SQL Task - see below... EXEC xp_cmdshell ? I'm trying to pass a parameter from a global variable into my SQL statement, but it won't let me add a parameter and returns syntax error. I have also tried 'EXEC xp_cmdshell ?,?' as there are two unnamed parameters for xp_cmdshell, but it does not like this either. Any Ideas? Ta Paul |
#4
| |||
| |||
|
|
Hi, In a DTS package, I have a SQL Task - see below... EXEC xp_cmdshell ? I'm trying to pass a parameter from a global variable into my SQL statement, but it won't let me add a parameter and returns syntax error. I have also tried 'EXEC xp_cmdshell ?,?' as there are two unnamed parameters for xp_cmdshell, but it does not like this either. Any Ideas? Ta Paul |
![]() |
| Thread Tools | |
| Display Modes | |
| |