aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

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

PLS-00204: function or pseudo-column 'string' may be used inside a SQL statement only
Cause: 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.
Action: 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;

请先 登录 后评论

1 个回答

小智
PLS-00204:函数或伪列' string '只能在SQL语句中使用,
.原因:在程序声明中使用伪列或禁止的功能。SQL伪列(LEVEL,ROWID,ROWNUM)只能在SQL语句中使用。同样,诸如DECODE,DUMP和VSIZE之类的某些功能以及SQL组功能(AVG,MIN,MAX,COUNT,SUM,STDDEV,VARIANCE)只能在SQL语句中使用。,
.操作:从过程语句中删除伪列引用或函数调用。或者,用SELECT INTO语句替换过程语句; 例如,替换奖金:= DECODE(rating,1,5000,2,2500,...); 使用以下语句:SELECT DECODE(rating,1,5000,2,2500,...)INTO bonus FROM dual;,
.
请先 登录 后评论