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 |
|
jdoering
Starting Member
32 Posts |
Posted - 2002-06-18 : 13:18:16
|
| I am working in SQL 2000. I have defined a global variable in my DTS package. I would like to run my DTS from a stored procedure. However, I would like to pass a variable into my stored procedure, that then passes the variable into the DTS package. The code for my procedure is below. My question is how and where do I placed the variable and in what syntax?CREATE PROCEDURE eCSUpload_Products @sSupplierName as varchar(35)ASExec master..xp_cmdshell 'DTSRun /SPOSEIDON /Usa /Psa /NLoad_Products_V1' @sSupplierName???????GOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GOAny help would be greatly appreciated. I need to keep all this in a stored procedure because I am working with .NET & ASPThanks,Julie |
|
|
setbasedisthetruepath
Used SQL Salesman
992 Posts |
Posted - 2002-06-18 : 13:34:38
|
| BOL will tell you everything you need to knowsetBasedIsTheTruepath<O> |
 |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-06-18 : 18:06:58
|
Just a little tip - to easily generate DTSRUN command strings use the dtsrunui utility (BTW I hope your sa password isn't sa )Goto Start/Run and type in dtsrunui and hit enterThis brings up the DTS interface, select server and package and then click on advanced, set any global variable values and then click thegenerate button. You can then copy and paste this command into QA. I would however remove the version switch it tends to put in there (/V)And since I'm feeling generous'DTSRun /SPOSEIDON /Usa /Psa /NLoad_Products_V1 /A "gvName":"8"="' & @sSupplierName & '"'Replace the & with a plus sign (it doesn't seem to show up ?)[How the Hell do you put a plus sign in a post ????] |
 |
|
|
|
|
|