All Forums Database
UpaMishra 35 posts Joined 01/08
13 Mar 2008
user defined exception

In oracle there is a way to make user defined exception .It is useful when there is need to catch more business related problems rather than just the traditional exception such as 'not found' or 'divide by zero'type.suppose we want an exception to be raised for a invalid entry(i.e. business specific) when inserting data into a table.The oracle way of doing it is as follows.1st step:- declare a variable of type exception.invalid_entry EXCEPTION;2nd step:-In the EXCEPTION block define the user defined exceptionEXCEPTION WHEN invalid_entry THEN statements.............................. ..................... ;3rd Step:-raise the exception in the block you need. RAISE le_invalid_entry;But I don't find any way in Teradata to do this.Is there any way in achieving that

joedsilva 505 posts Joined 07/05
13 Mar 2008

The stored procedures orange book describes a way in which you can make use of an external stored procedure to generate exceptions. You might want to take a stab on that example ...

You must sign in to leave a comment.