PLS-00508: The expression in a RETURN statement cannot be a type



PLS-00508: The expression in a RETURN statement cannot be a type..

Answer / guest

Cause: A datatype specifier was used instead of an
expression in the RETURN statement of a user-defined
function, as shown in the example below. Do not confuse the
RETURN statement, which sets the function identifier to the
result value, with the RETURN clause, which specifies the
datatype of the result value. FUNCTION credit-rating
(acct_no NUMBER) RETURN BOOLEAN IS BEGIN ... RETURN NUMBER;
-- should be an expression END;

Action: Replace the datatype specifier in the RETURN
statement with an appropriate expression.

Please add more information about this Error

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle Errors Interview Questions

NNO-00151: warning: ignoring hint for domain "string", server is authoritative

1 Answers  


ORA-30565: Only one INVALIDATE or UPDATE GLOBAL INDEXES clause may be specified

1 Answers  


ORA-09741: spwat: error waiting for a post.

1 Answers  


QSM-01124: set operator materialized view, string, doesn't have a marker column

1 Answers  


ORA-12446: Insufficient authorization for administration of policy string

1 Answers  






SQL*Loader-00530: OCI return status: need data

1 Answers  


ORA-01324: cannot add file string due to DB_ID mismatch

1 Answers  


ORA-29397: cannot grant/revoke switch privilege for string

1 Answers  


ORA-29857: domain indexes and/or secondary objects exist in the tablespace

1 Answers  


IMG-00821: area N queue clear failed

1 Answers  


LSX-00245: invalid ID "~S"

1 Answers  


TNS-00219: Pump Strategy : string

1 Answers  


Categories