最初由 wildcatqfj 发布
[B]
不行啊
Compilation errors for FUNCTION MSS.TEST
Error: PLS-00204: 函数或伪列 'DECODE' 只能在 SQL 语句中使用
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 (CURRVAL, LEVEL, NEXTVAL, 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; [/B]
SELECT DECODE(rating, 1, 5000, 2, 2500, ...) INTO bonus FROM dual;
这句是不是有些问题?
能把你的函数代码贴出来看看么? |