I am new to teradata. I have created a Stored Procedure that pulls SQL statments from a table, execute those statementes and places the results in another table. If any of those SQl statements fail I want the error to be stored in our Log table. I placed a SQL statement that I know will fail but when I run the procedure I see the Procedure call fais and it give me the error messsage but it is not inserting into the log table. Below is the exception code I am using. Any help is appreciated.
SET V_SQL_Msg = V_SQL_ERR_CD || ' ' || V_SQL_STATE;