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.


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;

2011-09-20 06:38:56
Thanks, this helps. :-)
2013-04-28 03:01:27

More Information

The Google Search results shown above are obtained by searching for this error using a custom google search engine which is restricted to a specific list of oracle reference sites. If you know a good oracle reference/help site and think that site should be included in this search, you can contribute to this search engine here.