PLS-00231: function 'string' may not be used in SQL

Answer Posted / guest

Cause: A proscribed function was used in a SQL statement.
Certain functions such as SQLCODE and SQLERRM can be used
only in procedural statements.

Action: Remove the function call from the SQL statement. Or,
replace the function call with a local variable. For
example, the following statement is illegal: INSERT INTO
errors VALUES (SQLCODE, SQLERRM); However, you can assign
the values of SQLCODE and SQLERRM to local variables, then
use the variables in the SQL statement, as follows: err_num
:= SQLCODE; err_msg := SQLERRM; INSERT INTO errors VALUES
(err_num, err_msg);

Please add more information about this Error

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

ORA-26029: index string.string partition string initially in unusable state

1816


ORA-07497: sdpri: cannot create trace file 'string'; errno = string.

2427


RMAN-05017: no copy of datafile number found to recover

1998


if the lengths of two wires are same and the area of cross sections is 4:7 then what will be the ratio of current passing through these wires

2327


ORA-26082: load of overlapping segments on table string.string is not allowed

1447






IMP-00064: Definition of LOB was truncated by export

6021


ORA-26079: file "string" is not part of table string.string

1603


invalid quantity specification negative quantity are not allowed for this item please check this item definition quantity

2982


ORA-16516: The current state is invalid for the attempted operation.

8259


[ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) Unsuccessful: alter table user.CEN_USER_MASTER add constraint FKF4EDEDC3D0BAAE75 foreign key (ROLE_ID) references user.CEN_ROLE_MASTER [ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) ORA-02275: such a referential constraint already exists in the table

2407


ORA-26027: unique index string.string partition string initially in unusable state

6342


IMP-00063: Warning: Skipping table "string"."string" because object type "string"."string" cannot be created or has different identifier

2400


ORA-26076: cannot set or reset value after direct path structure is allocated

1573


ORA-26028: index string.string initially in unusable state

3533


Hi guys, I have four tables those are emp,dept,eliminate and uneliminate. i wrote small cursor..when i run, it display one error (ORA-01403 nodata found)... The query is: Declare cursor c1 is select e.ename emp_name from emp e,dept d where e.deptno=d.deptno group by deptno; r1 c1%rowtype; test_emp varchar2(200); begin for r1 in c1 loop begin select eliminate_emp into test_emp from eliminate t,uneliminate ut where t.number=ut.number and t.deptno=e.deptno and rownum<1; end; dbms_output.put_line(r1.emp_name); end loop; end; Thanks...

2355