SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 cursors
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

arkiboys
Flowing Fount of Yak Knowledge

1417 Posts

Posted - 07/07/2011 :  07:37:37  Show Profile  Reply with Quote
My stored proc has two cursors i.e. cursor1 does a select and cursor 2 is within cursor 1.
How can this be implemented in ssis please?
Please note that for business requirements the stored proc has to be the way it is and the same thing has to be implemented in ssis.
Thank you

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 Posts

Posted - 07/07/2011 :  07:43:07  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
Maybe get the data from cursor 1 into an object then loop through the rows populating another object with the result of the second cursor.

It's an odd business requirement that says how a function should be implemented - I would ask whoever gave the requirement how it should be coded as they obviously know what they were expecting.
Not many developers would accept a requirement like this - I suspect there's a fast staff turnover.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

robvolk
Most Valuable Yak

USA
15675 Posts

Posted - 07/07/2011 :  08:09:59  Show Profile  Visit robvolk's Homepage  Reply with Quote
quote:
Please note that for business requirements the stored proc has to be the way it is and the same thing has to be implemented in ssis.
So the business requirement actually says "this must be done in the slowest and most ass-backward way possible?"

I'm not making fun of you, but that's what's being asked here.
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 07/07/2011 :  08:24:34  Show Profile  Visit russell's Homepage  Reply with Quote
You can execute the stored proc in the SSIS package.

And I doubt that nested cursors are a business requirement. Unless your company sells nested cursors...
Go to Top of Page

webfred
Flowing Fount of Yak Knowledge

Germany
8765 Posts

Posted - 07/07/2011 :  09:40:03  Show Profile  Visit webfred's Homepage  Reply with Quote
quote:
Originally posted by russell

You can execute the stored proc in the SSIS package.

And I doubt that nested cursors are a business requirement. Unless your company sells expensive nested cursors...




No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

arkiboys
Flowing Fount of Yak Knowledge

1417 Posts

Posted - 07/07/2011 :  09:43:25  Show Profile  Reply with Quote
I know what ou are saying but this is how it is at present in the SP and the manager is happy with it and he says it should not be changed.
Thanks
Go to Top of Page

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 Posts

Posted - 07/07/2011 :  10:06:22  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
That's easy then - don't change it. Don't understand what the question is - you have code that your manager is happy with and doesn't want changed, why are you trying to change it without changing it?

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000