Subject need help in sp
Author Regina Phandu
Hi all,

I need to make a store procedure like this:

set term #;
create procedure sp_end_of_day
as
begin
execute procedure sp_tot_money; --1st procedure
execute procedure sp_move_t_transaction; --2nd procedure
execute procedure sp_move_t_transaction_dtl; --3rd procedure
execute procedure sp_move_t_transaction_payment;

when any do exception failed;

end#
set term;#

The idea, let's say 1st procedure success, 2nd also success, but the 3rd one failed. it will rollback all the process right? Meaning it will rollback the 1st and 2nd procedure also.
Right now, i want to make this procedure works like this: let's say 1st procedure success, 2nd also success and the 3rd one failed. it will rollback. but when i execute the procedure again, i don't wanna execute 1st and 2nd procedure but i want to jump to procedure that failed before.

My question is can i do this? or should the application on the client do this?
If i can do this, then how?
btw, I guess i need to explain how the 1st or 2nd procedure works. basically, if those procedure error, it will raise an exception like 'Procedure failed'.

One thing that i can think of, if i can do this, then i need to create it using if..then..else...
but then i realize how can i catch the variable from the exception??

Any input would be appreciated


Thanks,
Regina Phandu



[Non-text portions of this message have been removed]