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

create a SSIS package which will call the stored procedure and dump the output of the procedure into table Expand / Collapse
Author
Message
Posted Wednesday, January 19, 2011 3:07 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 30, 2013 1:54 AM
Points: 39, Visits: 118
I want to create a SSIS package which will call the stored procedure and dump the output of the procedure into table.
This stored procedure accept an input parameter e.g. Date which i can retrieve from another table like select max(Date) from userid and pass to procedure.

SSIS packae will return the output and i need this resultset ouput to dump into another table.
But before inserting i want to delete the rows from that tables if any rows exist for that date and then finally insert the resultset.
Post #1049873
Posted Wednesday, January 19, 2011 3:23 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 4,828, Visits: 11,181
Karan_W (1/19/2011)
I want to create a SSIS package which will call the stored procedure and dump the output of the procedure into table.
This stored procedure accept an input parameter e.g. Date which i can retrieve from another table like select max(Date) from userid and pass to procedure.

SSIS packae will return the output and i need this resultset ouput to dump into another table.
But before inserting i want to delete the rows from that tables if any rows exist for that date and then finally insert the resultset.


..and your question is?



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1049882
Posted Wednesday, January 19, 2011 3:51 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 4,828, Visits: 11,181
OK, maybe that was a bit harsh on an SSIS newbie.

After looking at this, I must admit that I found myself thinking that it would be easier to get the stored procedure to do everything, rather than faffing around with the various SSIS tasks that you would need.

Everything you have asked for (barring the initial parameterised call to the sp) can easily be accommodated in T-SQL - so why have you decided on using SSIS?



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1049897
Posted Wednesday, January 19, 2011 6:24 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 30, 2013 1:54 AM
Points: 39, Visits: 118
Hi ,
Thanks for reply. Yes it can be done by SP also but requirement is to get it done by SSIS only so any help would be really appreciable.
Post #1049995
Posted Wednesday, January 19, 2011 6:43 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, March 26, 2014 6:06 AM
Points: 192, Visits: 164
Hi Karan,

Use the execute SQL task to run your stored procedures in the sequence required.


Regards,
Barkha.
Post #1050006
Posted Friday, January 21, 2011 12:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 30, 2013 1:54 AM
Points: 39, Visits: 118
I am still not able to make any progress.
The steps i am doing:

1st step:Execute Sql task--To get the max(date) mdate from table and assign the madate to user defined variable in resultset otopn of task.

2nd Step: Another Execute Sql task to delete the data from table based on passed parameter

3rd Step:Drag n drop a data flow task--it contains one oledb source
and one oledb destination.
Inside oledb source, i have defined oledb connection manager.
Data access mode is sql command and passing SP name e.g.

exec sp_name @UserDate = ?

@UserDate is actual input parameter passed to SP.
After this i am maaping parameter with User variable.

Once i click on preview i get the error messgae..no value given for one or more required parameter.
If i change the sql command like exec sp_name ? then also same error.
Can anyone help me to resolve this?
Post #1051366
Posted Friday, January 21, 2011 5:18 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 3:10 AM
Points: 199, Visits: 500
Try something like below...

SET NOCOUNT ON
exec sp_name @UserDate = ?

and pass parameter in Parameters Tab (@UserDate = <Variable Name>)
Post #1051455
Posted Tuesday, May 07, 2013 10:50 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, February 04, 2014 9:32 AM
Points: 208, Visits: 62
Pretty cryptic response....

I tried it in my call to a stored proc from a Foreach loop and the "No value given for one or more required parameters." is still issued.

/john
Post #1450252
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse