SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to display output of Execute SQL Task (Visual Studio 2008)


How to display output of Execute SQL Task (Visual Studio 2008)

Author
Message
smart_analyst
smart_analyst
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 109
I have created a my first SSIS package where I am using Execute SQL task and trying to run a simple select query.

I am using one input variable school_name and trying to display school_no. Task gets executed with one error but it doesn't fail. I don't know how to display the result. Should I use Excel destination or flat file destination tool? Please find the screenshots using below links. If you require more screenshots or detail I will provide. Thanks.

https://www.mediafire.com/?kdv37ckqvlddf22,w4vst25vtqat8c0,jd9ska9fba6c3cy
Eirikur Eiriksson
Eirikur Eiriksson
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38366 Visits: 19424
smart_analyst (8/28/2014)
I have created a my first SSIS package where I am using Execute SQL task and trying to run a simple select query.

I am using one input variable school_name and trying to display school_no.

There is no UI that displays any results in the Command Flow. The most straight forward way is to create a variable to assign the returned value from your query in the Execute SQL task. Then use a MessageBox in a script task to display the value.

Task gets executed with one error but it doesn't fail.

The error exception is configurable to a certain extent within SSIS.
Cool

BTW: I recommend you have a look at Stairway to Integration Services.
smart_analyst
smart_analyst
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 109
The most straight forward way is to create a variable to assign the returned value from your query in the Execute SQL task.


I have created variable called SCHOOL_NO and assigned that to Result Set of Execute SQL task. Did you mean that?

I have connected the green arrow from Execute SQL task to Data flow Task. And then in Data Flow tab, I am using OLE DB SOURCE to Data Conversion to Excel Destination.

How to transfer value of Variable SCHOOL_NO to OLE DB Source? or Is there any way I can transfer the value from variable to Excel destination?
raghavender.2369
raghavender.2369
SSC-Enthusiastic
SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)SSC-Enthusiastic (171 reputation)

Group: General Forum Members
Points: 171 Visits: 391
To verify the result set value : use one more execute sql task and write insert statement into one temp table, pass the parameter from the 1st sql execute task.
smart_analyst
smart_analyst
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 109
I performed this task differently. This was my first package for learning. Thank you all !
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search