SQL Server Business Intelligence

SQL SERVER 2005 & 2008 IS THE MAIN THEME OF THIS BLOG

Tuesday, December 13, 2005

Execute SQL Task - Retrieving LoadId & Assigning To User Variable

During daily load of data warehouse I wanted to get the LoadID from a table for that load and assign it to a user variable. I wanted to execute a stored procedure which will return an output value which will be the LoadID. I wanted to assign it to a variable.

The SQLStatement would be “EXEC prc_get_loadid ? OUTPUT”. You can see from the link below:
http://www.smart-bi-solutions.com/BlogStuff/13122005_01.jpg

From the link below below you can see that I am assigning the output value from stored procedure to user defined variable. Please note that the variables are case sensitive within SSIS.
http://www.smart-bi-solutions.com/BlogStuff/13122005_02.jpg

Now I assigned the output (LoadId) from a stored procedure to user variable, I can use that variable anywhere within the calling SSIS (parent / child) package which handles the daily load.

Thanks
Sutha

0 Comments:

Post a Comment

<< Home