I'm trying to modify the SQL statement of an Execute SQL Task using a Dynamic Properties Task. I can successfully modify the SQL statement via a new query in the Dynamic Properties Task, but I can't seem to use the global variable that I've created.
For example, if my Dynamic Propterties Query is:
DECLARE @sql VarChar(4000)
SELECT @sql = 'SELECT 100'
SELECT @sql
Then the query statement in my Execute SQL Task is successfully changed to:
SELECT 100
But, when I try to utilize a global variable, such as in this:
DECLARE @sql VarChar(4000)
SELECT @sql = 'SELECT ' + DTSGlobalVariables("rpt_dt".Value
SELECT @sql
I get a message stating that...
DTSGlobalVariables is not a recognized function name
Can anyone assist?
Jim
For example, if my Dynamic Propterties Query is:
DECLARE @sql VarChar(4000)
SELECT @sql = 'SELECT 100'
SELECT @sql
Then the query statement in my Execute SQL Task is successfully changed to:
SELECT 100
But, when I try to utilize a global variable, such as in this:
DECLARE @sql VarChar(4000)
SELECT @sql = 'SELECT ' + DTSGlobalVariables("rpt_dt".Value
SELECT @sql
I get a message stating that...
DTSGlobalVariables is not a recognized function name
Can anyone assist?
Jim