Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert SQLERRM in the table

772262Aug 28 2012 — edited Aug 28 2012
CREATE OR REPLACE
PROCEDURE cdsshell.prc_drop_partition (days IN NUMBER)
AS
l_sqlerrm VARCHAR2(4000);
BEGIN
<<Code >>
EXCEPTION
WHEN OTHERS THEN
l_sqlerrm := SQLERRM;
INSERT INTO ctrl.ctrl_typ (ctrl_id,
ctrl_typ,
ctrl_sum,
ctrl_detail,
ctrl_status,
ctrl_object,
ctrl_mapping,
ctrl_msg_inf,
ctrl_cd_err,
event_id)
VALUES ( ctrl.csr_ctrl_id_seq.NEXTVAL,
'ERR',
'SQL',
'Partition Management',
'ER',
v_table_name,
'Partition Management from cla, cdsshell, cdactimize',
l_sqlerrm,
SQLCODE,
(SELECT event_id FROM ctrl.ctrl_event
WHERE event_status = 'P'
AND event_desc = 'Partition Management'
AND TRUNC(end_dt) = TO_DATE('31-12-9999','dd-mm-yyyy')));

END;
/
SHOW ERRORS;


I get error on
l_sqlerrm := SQLERRM
PL/SQL: SQL Statement ignored

and
l_sqlerrm when inserting in the table.

PL/SQL: ORA-00984: column not allowed here


Please can I know what is wrong.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2012
Added on Aug 28 2012
3 comments
671 views