How to fix the Oracle error PLS-00204: function or pseudo-column ‘string’ may be used inside a SQL statement only?
In this post, you’ll learn more about the Oracle ErrorPLS-00204: function or pseudo-column ‘string’ may be used inside a SQL statement only with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
PLS-00204: function or pseudo-column ‘string’ may be used inside a SQL statement only
Reason for the Error PLS-00204: function or pseudo-column ‘string’ may be used inside a SQL statement only
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.
How to fix the Error PLS-00204: function or pseudo-column ‘string’ may be used inside a SQL statement only ?
You can fix this error in Oracle by following the below steps
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;
Leave Your Comment