Using Global Variables in SQL Task

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello:

I'm trying to use a parameter in an SQL Task. The task's data
connection is just to the local SQL Server. It should be simple enough:

DELETE FROM dTable WHERE DATEDIFF(d,[Timestamp],getdate()) < ?

However, when I click on the "Parameters" button I get an error:

"Invalid Parameter Number"

followed by:

"An error occurred while parsing the SQL Statement for parameters.
Please check the syntax of the SQL statement and verify that it is
valid for the connection selected"

The SQL Statement is correct, and works fine if I hardcode a number
into the parameter. I am trying to use a global variable of type
"integer" that I have created in the package's global variables
section.

Any ideas?

Thanks,
Kayda

.


Quantcast