Thursday, November 5, 2009

OLE DB Parameterized SQL Command in Execute SQL Task

There are very good articles on the internet explaining how to use different parameters in 'Execute SQL Task' control of SSIS.
I needed to use the same parameter twice in my query so this is what i did:

Since SSIS treats every other '?' used in SQL statement as a new parameter index I used the same variable twice. And the 'where' clause used is like:
WHERE (? = GetDate() OR CreatedDate > ? ) 
Reads where fromdate is equal to today or created date is greater than fromdate.

External Links

No comments:

Post a Comment