July 7, 2003 at 9:53 am
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?
July 7, 2003 at 10:05 am
Try wrapping your query in your Execute SQL Task in a stored procedure and then pass in the parameter...this should work fine using the EXEC usp_mysproc ? syntax...
hth,
Michael
Michael Weiss
Michael Weiss
July 7, 2003 at 11:39 am
Great suggestion - worked wonderfully
Thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply