Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to display output of Execute SQL Task (Visual Studio 2008) Expand / Collapse
Author
Message
Posted Thursday, August 28, 2014 8:17 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, October 2, 2014 5:41 PM
Points: 23, 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
Post #1608475
Posted Thursday, August 28, 2014 9:28 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 6:45 PM
Points: 2,187, Visits: 5,919
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.


BTW: I recommend you have a look at Stairway to Integration Services.

Post #1608480
Posted Thursday, August 28, 2014 10:51 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, October 2, 2014 5:41 PM
Points: 23, 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?
Post #1608489
Posted Monday, September 1, 2014 11:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, October 16, 2014 7:33 AM
Points: 45, Visits: 346
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.
Post #1609380
Posted Tuesday, September 2, 2014 7:35 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, October 2, 2014 5:41 PM
Points: 23, Visits: 109
I performed this task differently. This was my first package for learning. Thank you all !
Post #1609863
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse