Is there any Teradata equivalent of Oracle's "PRAGMA AUTONOMOUS TRANSACTION" option?
I have a procedure whose only purpose is to log something into a log table.
This routine is called many times from many different procedures.
If a parent routine has an exception, and a ROLLBACK occurs, I don't want to rollback the log table! The log table must always be committed.
In Teradata this can be done with EXCEPTION HANDLERS.
When an exception is raised, the current transaction is rolled back, and then the handler takes over: you can put there the logging action.