-
Passing Parameters to Pass Through Query
OK - I'm still working on this pass through query. I have a stored procedure on a SQL Server and I have several parameters associated with the stored procedure. I can get the pass through query to work great when I send the parameters directly to the query. For instance, when I say ...
EXECUTE spBuildLocalDataBudgetDet_EMEA_CL '17', '3', '2007', 'strang', '2'
I get all the records that I expect to get - it's great.
But I save that execution as a query so that I can refer to it and use it to build temporary tables for reporting, etc... So I don't want to "hard code" the parameters in there. I have a function called GetGvar that allows me to set variables throughout the application and then call them whenever I need them. I was hoping to use them in this case - like so ...
EXECUTE spBuildLocalDataBudgetDet_EMEA_CL @CountryID = getgvar("country"), @QuarterID = getgvar("qtrnum"), @nYear = getgvar("year"), @rusername = getgvar("username"), @Geo = getgvar("geo")
But it's not working. How do I dynamically send the parameters to this saved pass through query? Those parameters will be different based on whoever has logged on to the application, etc...
HELP!
Thanks,
PamelaDV
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|