![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to pass a param to a stored proc, from a DTS package. I'm able to pass params to queries in certain Execute SQL Tasks (by using a Global Var and the ? in the query), but I can't figure out how to pass a param to a stored proc in an Execute SQL Task. Can I? Or do I have to us an ActiveX Script Task? Thanks, Andre |
#3
| |||
| |||
|
|
Do you mean like this? Global Variables and Stored Procedure Parameters (http://www.sqldts.com/default.aspx?234) "Andre" <no (AT) spam (DOT) com> wrote I want to pass a param to a stored proc, from a DTS package. I'm able to pass params to queries in certain Execute SQL Tasks (by using a Global Var and the ? in the query), but I can't figure out how to pass a param to a stored proc in an Execute SQL Task. Can I? Or do I have to us an ActiveX Script Task? Thanks, Andre |
#4
| |||
| |||
|
|
I swear that's what I was doing - I must have had something else wrong. It's working now. Thanks for the article. Andre "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%23KI$FKYFFHA.2508 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Do you mean like this? Global Variables and Stored Procedure Parameters (http://www.sqldts.com/default.aspx?234) "Andre" <no (AT) spam (DOT) com> wrote I want to pass a param to a stored proc, from a DTS package. I'm able to pass params to queries in certain Execute SQL Tasks (by using a Global Var and the ? in the query), but I can't figure out how to pass a param to a stored proc in an Execute SQL Task. Can I? Or do I have to us an ActiveX Script Task? Thanks, Andre |
#5
| |||
| |||
|
|
Allan, If you're still monitoring this thread, I need to ask a follow-up question. How do I pass multiple parameters to my sproc? I've tried putting multiple ?, both with and without commas between the ? but to no avail. Is it not possible to pass multiple parameters to a sproc? Neither of these work: EXEC MySproc ? ? EXEC MySproc ?, ? Thanks, Andre "Andre" <no (AT) spam (DOT) com> wrote in message news:eq0CTtdFFHA.3824 (AT) TK2MSFTNGP10 (DOT) phx.gbl... I swear that's what I was doing - I must have had something else wrong. It's working now. Thanks for the article. Andre "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%23KI$FKYFFHA.2508 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Do you mean like this? Global Variables and Stored Procedure Parameters (http://www.sqldts.com/default.aspx?234) "Andre" <no (AT) spam (DOT) com> wrote I want to pass a param to a stored proc, from a DTS package. I'm able to pass params to queries in certain Execute SQL Tasks (by using a Global Var and the ? in the query), but I can't figure out how to pass a param to a stored proc in an Execute SQL Task. Can I? Or do I have to us an ActiveX Script Task? Thanks, Andre |
#6
| |||
| |||
|
|
Works for me CREATE PROCEDURE dbo.MyProc @a int, @b int AS SELECT @a + @b as Value GO In my ExecuteSQL task I do EXEC dbo.MyProc ?,? I then map a Global Variable to each ? Are you getting errors? Allan "Andre" <no (AT) spam (DOT) com> wrote Allan, If you're still monitoring this thread, I need to ask a follow-up question. How do I pass multiple parameters to my sproc? I've tried putting multiple ?, both with and without commas between the ? but to no avail. Is it not possible to pass multiple parameters to a sproc? Neither of these work: EXEC MySproc ? ? EXEC MySproc ?, ? Thanks, Andre "Andre" <no (AT) spam (DOT) com> wrote in message news:eq0CTtdFFHA.3824 (AT) TK2MSFTNGP10 (DOT) phx.gbl... I swear that's what I was doing - I must have had something else wrong. It's working now. Thanks for the article. Andre "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%23KI$FKYFFHA.2508 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Do you mean like this? Global Variables and Stored Procedure Parameters (http://www.sqldts.com/default.aspx?234) "Andre" <no (AT) spam (DOT) com> wrote I want to pass a param to a stored proc, from a DTS package. I'm able to pass params to queries in certain Execute SQL Tasks (by using a Global Var and the ? in the query), but I can't figure out how to pass a param to a stored proc in an Execute SQL Task. Can I? Or do I have to us an ActiveX Script Task? Thanks, Andre |
![]() |
| Thread Tools | |
| Display Modes | |
| |