Re: Informix equivalent of savepoint
Posted in 1997
In article <5j0ddr$6b2@cssun.mathcs.emory.edu>, JULIEJ@Inf.COM (JULIEJ) wrote: > Hello, > > In Informix is there an equivalent command for the Oracle > savepoint command? > > or > > sqlstmt1.. > sqlstmt2 > sqlstmt3 > ..... > ..... > ..... > ..... > sqlstmt10 > > After sqlstmt10, I want to rollback upto sqlstmt5. How would I do it? > You can achieve a similar sort of functionality in Informix 4GL, in a roundabout way. For example LET l_post_sql_stmt5_behaviour = 'normal' LABEL restart: #------------- BEGIN WORK sqlstmt1 sqlstmt2 .. sqlstmt5 .. sqlstmt10 IF something_happens THEN LET l_post_sql_stmt5_behaviour = 'changed' ROLLBACK WORK GOTO restart END IF .. END FUNCTION As with Oracle, I would guess that some variable is being used to control behaviour after sqlstmt5. Executed in an OLTP (i.e small number of rows affected), the overhead of undoing and redoing stmts 1 to 5 would be minimal (as those rows would still be in the Shared Memory Buffer). I'm sure there is a need for this sort of functionality - I just can't figure out an example - could you e-mail me your actual business problem? Bye, ---------------------- Rudy Fernandes GIC, Kuwait OL 7.20, 4Gl 6.04 ----------------------