In a DTS pkg, an Execute SQL task, I tried to use the question mark to set a global variable in a subquery and got a message along the lines that "...parameters cannot be set in subqueries..."
Above the query I then tried the following
declare @mydate datetime
set @mydate = ?
Then I got a message about a syntax error when I clicked the parameter button.
Any suggestions on how I can get around these errors and set my paramter to the global variable defined in the package?