|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, April 23, 2013 6:42 AM
Points: 36,
Visits: 109
|
|
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.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:29 AM
Points: 4,240,
Visits: 9,487
|
|
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:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:29 AM
Points: 4,240,
Visits: 9,487
|
|
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:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, April 23, 2013 6:42 AM
Points: 36,
Visits: 109
|
|
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.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, September 03, 2012 10:57 PM
Points: 192,
Visits: 157
|
|
Hi Karan,
Use the execute SQL task to run your stored procedures in the sequence required.
Regards, Barkha.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, April 23, 2013 6:42 AM
Points: 36,
Visits: 109
|
|
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?
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 2:55 AM
Points: 195,
Visits: 463
|
|
Try something like below...
SET NOCOUNT ON exec sp_name @UserDate = ?
and pass parameter in Parameters Tab (@UserDate = <Variable Name>)
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Today @ 11:26 AM
Points: 4,
Visits: 16
|
|
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
|
|
|
|