I have declared a variable at the package level compdate and am testing data flow to the variable by droping an Execute SQL Task in the Control Flow of the package.
In the task,
SQL Statement:select ? = (getdate() - 1)
Parameter Mappings:
- Variable Name:
User::compdate - Direction:
Output - Data Type:
DATE - Parameter Name:
0 - Parameter Size:
-1.
Why am i getting error:
[Execute SQL Task] Error: Executing the query "declare @compdate date
set @compdate = (getdate() ..." failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


getdate - 1result into the package variable from within the package. I have done this before but cant seem to find the reference to how to do it. Or at least something that is straight forward enough to actually digest its meaning.