Oracle Error PLS-00204: function or pseudo-column ‘string’ may be used inside a SQL statement only

Oracle Error Message

PLS-00204: function or pseudo-column ‘string’ may be used inside a SQL statement only

Reason for the Error

A pseudocolumn or proscribed function was used in a procedural statement. The SQL pseudocolumns (LEVEL, ROWID, ROWNUM) can be used only in SQL statements. Likewise, certain functions such as DECODE, DUMP, and VSIZE and the SQL group functions (AVG, MIN, MAX, COUNT, SUM, STDDEV, VARIANCE) can be used only in SQL statements.

Solution

Remove the pseudocolumn reference or function call from the procedural statement. Or, replace the procedural statement with a SELECT INTO statement; for example, replace bonus := DECODE(rating, 1, 5000, 2, 2500, …); with the following statement: SELECT DECODE(rating, 1, 5000, 2, 2500, …) INTO bonus FROM dual;

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...