Oracle Error PLS-00251: RETURN, for actual function return, must be last in the parameters clause

Oracle Error Message

PLS-00251: RETURN, for actual function return, must be last in the parameters clause

Reason for the Error

RETURN specification for the actual function return, used within the parameters clause must hold the very last position. Example : The following will give this error since the RETURN specification for the actual function return in the parameters clause is not the last. FUNCTION myexternalfunc (var1 BINARY_INTEGER, var2 BINARY_INTEGER) RETURN BINARY_INTEGER IS EXTERNAL NAME “myexternalfunc” LIBRARY somelib PARAMETERS (var1 LONG, var2 SHORT, RETURN INT, RETURN INDICATOR SHORT); The correct syntax is the following. Note that RETURN for actual function return is the last specification in the parameters clause. FUNCTION myexternalfunc (var1 BINARY_INTEGER, var2 BINARY_INTEGER) RETURN BINARY_INTEGER IS EXTERNAL NAME “myexternalfunc” LIBRARY somelib PARAMETERS (var1 LONG, var2 SHORT, RETURN INDICATOR SHORT, RETURN INT);

Solution

Correct the syntax of the RETURN specification in the parameters clause

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Oracle Error Message CLSGN-32767: Internal error. Reason for the Error An unexpected error occurred. Solution Examine the message(s) that accompany...
Oracle Error Message CLSGN-00211: OCR batch operation failed. string Reason for the Error Setting a set of Oracle Cluster Registry...
Oracle Error Message CLSGN-00210: failed to get value for OCR key “string”. string Reason for the Error It was not...