Hi marist, that works but the code it returns is incorrect, if you get ORA-0942 it will return $? = 174 because in UNIX only 0 - 255 is used

Amar I understand it´s easier use a file and treat the file, I thought there is another way of doing it

Vinit sqlerrm works in PL/SQL but not SQL

hrishy what is the $? you get?