Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSIS Variables Not Updating (From Execute SQL Task)

Status
Not open for further replies.

Sweenster

MIS
Sep 9, 2005
58
GB
Hello All,

I am trying to populate variables in a new SSIS package using the Execute SQL Task but I am having an issue to get the actual values to update! Steps I have completed....

Created Variables with Package wide scope
Added an Execute SQL task.
Pointed connection to Server
Edited (& Tested!) the SQL Statement
Changed Results Set to Single Row
Updated the Results Set tab to correct column and variable

If you run the package the Execute SQL Task works fine but watching the variables shows that the value does not change at all..

I need these to do some dynamic stuff later on..Seems pretty straight forward..Am I missing something??

Extra Details of an example..

--Execute SQL Task--
SQL Statement:
SELECT FinancialYear --Works fine
FROM [RemusV2].[dbo].[tbl_Structural_Dates]
WHERE DATE = DATEADD(dd, DATEDIFF(dd,0,GETDATE())-7, 0)

Result Set:SingleRow
ResultName=FinancialYear
VariableName:FinancialYear




 
Try putting 0 under result name and see if it sets the variable value dynamically

Armani
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top