![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am running into some problems and have no idea how to go around this - i know it must be possible... i am using SQL 2K i want to set my global variables based on results from my stored proc. in dynamic properties task i add a property (global variable) and i choose query and i put the name of my stored proc and a param to it (which is another global). pGetResults id That does nothing... I heard you have to put ? so I try pGetResult ?id -> nothing pGetResult 10 -> nothing when i run pGetResult from Query Analyzer I get the result. So, i save that as a query to see if I could browse to it and get the result. Still nothing. What in the world am I doing wrong??? Thanks, Branka |
#3
| |||
| |||
|
|
-----Original Message----- I do not know that you can do that i.e. use the ? in this task. Where do you map the Global Variable to the ? ? I would use an ExecuteSQL task to do this an assign the values in an Active Script task. You can assign the results of your Queries with a ? to an output rowset and then assign that to your package properties. -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "branka" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:06c301c3a7eb$bbf318d0$a101280a (AT) phx (DOT) gbl... I am running into some problems and have no idea how to go around this - i know it must be possible... i am using SQL 2K i want to set my global variables based on results from my stored proc. in dynamic properties task i add a property (global variable) and i choose query and i put the name of my stored proc and a param to it (which is another global). pGetResults id That does nothing... I heard you have to put ? so I try pGetResult ?id -> nothing pGetResult 10 -> nothing when i run pGetResult from Query Analyzer I get the result. So, i save that as a query to see if I could browse to it and get the result. Still nothing. What in the world am I doing wrong??? Thanks, Branka . |
#4
| |||
| |||
|
|
Thanks for clarifying - I was running into problems because I have both MSSQL 2000 and 7 installed on my machine .I will have to set my globals via Execute SQL task which is too bad - i wanted to set them in dynamic properties task by calling specific stored procs (with the global passed as a param). It seems like there is a problem with that - I get the error msg saying "error converting type nvarchar to int". I am trying to do this pGetData iGlobalVar looks like it is taking iGlobalVar as string and not the value of it. I also want to set queries based on pGetQuery iGlobalVar, so if you know of a way to do that work around, I would rally appreciate it. Thanks, Branka -----Original Message----- I do not know that you can do that i.e. use the ? in this task. Where do you map the Global Variable to the ? ? I would use an ExecuteSQL task to do this an assign the values in an Active Script task. You can assign the results of your Queries with a ? to an output rowset and then assign that to your package properties. -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "branka" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:06c301c3a7eb$bbf318d0$a101280a (AT) phx (DOT) gbl... I am running into some problems and have no idea how to go around this - i know it must be possible... i am using SQL 2K i want to set my global variables based on results from my stored proc. in dynamic properties task i add a property (global variable) and i choose query and i put the name of my stored proc and a param to it (which is another global). pGetResults id That does nothing... I heard you have to put ? so I try pGetResult ?id -> nothing pGetResult 10 -> nothing when i run pGetResult from Query Analyzer I get the result. So, i save that as a query to see if I could browse to it and get the result. Still nothing. What in the world am I doing wrong??? Thanks, Branka . |
![]() |
| Thread Tools | |
| Display Modes | |
| |