July 6, 2012 at 3:55 am
Hi,
I'm reasonably new to the world of SSIS, particularly with SQL Server 2012. I'm trying to execute a very simple query in an Execute SQL Task and then assign the result to a variable.
I've created the variable and then set the result set type of the task to ResultSetType_SingleRow. I don't seem to have the various pages that this reference talks about. Instead all i get in my Edit execute sql task dialog is in the screenshot attached. Essentially i get an error when executing the task saying it is unable to assign the result to my variable because the result set bindings aren't set. But i can't seem to set them anywhere??? This is driving me nuts because it should be so simple!
How can i get the dialog that the technet article talks about?
Thanks,
Simon
July 6, 2012 at 4:00 am
Change the select statement to
SELECT ? = MAX(PolicyID) FROM dbo.FactPolicy
Then in the paramter mappings of the task set the mapping to the variable as an output type, that should then allow you to pass that into the data flow task.
July 6, 2012 at 4:09 am
Hi,
Thanks for that. I've changed the query as you've suggested but can't find the parameter mappings options you mention. I might not be looking in the correct place, hence my confusion.
Thanks,
Simon
July 6, 2012 at 4:12 am
Sorry my bad, there is no parameter mapping option on that task, you will need to use the Execute SQL Task instead.
July 6, 2012 at 4:16 am
Hi,
But that's the task i'm using 🙁
See attached screenshot. The confusion has come about because i'm sure i'm using the correct task, but i'm not getting the same dialog box that everyone else talks about.
Thanks,
Simon
July 6, 2012 at 4:19 am
Thats an Execute T-SQL Statement task, you need a Execute SQL task.
July 6, 2012 at 4:19 am
Scrap that i've not found a different task under favorites.
My bad, but thanks for your help. I should be ok from here!
Stupid tasks with similar names..... grr....
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply