Something like this......
declare authors_scroll_crsr scroll cursor
for exec sp_get_authors 'CA'
.
.
.
This would really make life easier as a developer.
There have been many moments where that feature would have saved me
lots of time.
Any thoughts????
Jimmy
You can setup a proc as a proxy table and the select from it from your
cursor.
joop
Hmmmm, I don't quite see your goal. What is it that is being, well, shall I
say, "variableized" in your logic? Is it 'CA', 'MD', "VA', etc? Or the
name of a stored procedure (sp_get_authors)? Or something else? I suspect
that 'execute immediate' can be used to solve your problem ... if you could
be more specific.
....so the only way is suggested below - to use a proxy table mapped to
the proc call as the proxy table effectively maps the expected outputs -
although you have to be careful as it isn't always perfect (i.e.
multiple queries with same result columns).
No different than using a view..But the power of the business rules in
the SP being abstracted out
would be a huge time saver.
Bottom line:
I want output of an SP to be fed into a CURSOR.
> > joop- Hide quoted text -
>
> - Show quoted text -