You can identify important states within a transaction and return to them selectively by using savepoints to separate groups of related statements.
CONNECT DATABASE iqdemo
INSERT INTO FinancialCodes (Code, Type, Description) VALUES ('e8', 'expense', 'Services')
SAVEPOINT TUES9_45
Naming your savepoint (as shown) is optional. You must follow the rules for object names described in Reference: Statements and Options.
INSERT INTO FinancialCodes (Code, Type, Description) VALUES ('r3', 'fees', 'Administration') COMMIT
If this insert command were to fail, the transaction would roll back to Savepoint TUES9_45. The data inserted in Step #2 would not be lost.