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-16626: failed to enable specified object

1771


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

2299


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

1472


[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

2287


ORA-26030: index string.string had string partitions made unusable due to:

1559






NZE-28890: Entrust Login Failed

1409


IMG-02003: 2FF03 - incorrect color histogram feature specification

1199


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

2313


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

2857


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

1376


IMP-00060: Warning: Skipping table "string"."string" because object type "string"."string" does not exist or has different identifier

2620


ORA-26095: unprocessed stream data exists

2803


ORA-16627: No standby databases support the overall protection mode.

3554


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

1881


IMP-00064: Definition of LOB was truncated by export

5886