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 |
sdettling
Starting Member
2 Posts |
Posted - 2008-09-21 : 11:09:38
|
Hello all,I am trying to pass a variable from a stored procedure into a dts package. In the dtsrun command (within the stored procedure), I have added the following:/A batchID:varchar(50)=@messageBatchKeyIn the package I added batchID into the global variables tab and set it as a sting. What I need to do is perform a data transfer based on the batchid that I pass in. Here is what I am doing in the Transform Data Task query section:SELECT t_sqlbox_outbox_sms.*FROM t_sqlbox_outbox_smsWHERE t_sqlbox_outbox_sms.message_log_id = '" & _DTSGlobalVariables("@batchID").Value & "' Nothing seems to be working though. Can someone help?? Thanks!!! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-21 : 13:10:54
|
quote: Originally posted by sdettling Hello all,I am trying to pass a variable from a stored procedure into a dts package. In the dtsrun command (within the stored procedure), I have added the following:/A batchID:varchar(50)=@messageBatchKeyIn the package I added batchID into the global variables tab and set it as a sting. What I need to do is perform a data transfer based on the batchid that I pass in. Here is what I am doing in the Transform Data Task query section:SELECT t_sqlbox_outbox_sms.*FROM t_sqlbox_outbox_smsWHERE t_sqlbox_outbox_sms.message_log_id = '" & _DTSGlobalVariables("@batchID").Value & "' Nothing seems to be working though. Can someone help?? Thanks!!!
cant you use place holder (?) in transform data task query pane and then use activex script for lookup?http://www.databasejournal.com/features/mssql/article.php/10894_3300201 |
|
|
sdettling
Starting Member
2 Posts |
Posted - 2008-09-22 : 12:14:36
|
Thanks for replying. I thought I tried that but it did not work. Could you tell me exactly where I would enter this?? Also, is the dtsrun command correct (/A batchID:varchar(50)=@messageBatchKey)??Thank you very much for your help. |
|
|
|
|
|