Subject | Stored Procedure executing another stored procedure (wrapper sp) |
---|---|
Author | Newbie |
Post date | 2012-05-03T20:53:51Z |
Is it possible and architecturally wise to execute another stored
procedure from a sp?
I have currently a selectable sp with many IF statements, all of them
return a select with same fields, but with different conditions.
I am thinking to divide them into several stored procedures and have
main sp to calling out others. something like
if () then
select * from sp1
else if()then
select * from sp2
etc.
is it wise to do this way? is there a good sample for doing it?
thanks.
procedure from a sp?
I have currently a selectable sp with many IF statements, all of them
return a select with same fields, but with different conditions.
I am thinking to divide them into several stored procedures and have
main sp to calling out others. something like
if () then
select * from sp1
else if()then
select * from sp2
etc.
is it wise to do this way? is there a good sample for doing it?
thanks.