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!

ORA-06592: CASE not found while executing CASE statement

BS2012Oct 16 2013 — edited Oct 16 2013

Hi Everyone,

My DB version is

BANNER                                                       

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi

PL/SQL Release 10.2.0.1.0 - Production                         

CORE 10.2.0.1.0 Production                                       

TNS for Linux: Version 10.2.0.1.0 - Production                 

NLSRTL Version 10.2.0.1.0 - Production      

I'm getting this error while executing a package.

But this is unpredictable because sometimes it's coming and sometimes it's not.

Please suggest me something. Please do have a look at this case statement.

Everytime I'm passing the value as 'ALERT' for the transaction name. Sometimes it's successful and sometimes it's throwing ORA-06592

CASE UPPER(IC_TRANSACTION_NAME)

       

         WHEN 'ALERT' THEN

       

         SELECT A.FACILITY_ID INTO VN_FACILITY_ID FROM ALERT A

         WHERE A.ALERT_ID = IN_PARENT_NODE_ID;

       

         INSERT INTO TRANSACTION_HISTORY (TXN_HISTORY_ID,

                                         TXN_SOURCE_NAME,

                                         TXN_ID,

                                         TXN_TYPE,

                                         TXN_USER_ID,

                                         TXN_DATE,

                                         PATIENT_ID,

                                         FACILITY_ID,

                                         ACCOUNT_ID)

                                 VALUES (TXN_HISTORY_SEQ.NEXTVAL,

                                         IC_TRANSACTION_NAME,

                                         IN_PARENT_NODE_ID,

                                         IC_TXN_TYPE,

                                         IN_MODIFIED_BY,

                                         ID_MODIFIED_DATE,

                                         VN_PATIENT_ID,

                                         VN_FACILITY_ID,

                                         VN_ACCOUNT_ID)

        RETURNING TXN_HISTORY_ID INTO VN_TXN_HISTORY_ID;

END CASE;

Regards,

BS2012.

This post has been answered by padders on Oct 16 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2013
Added on Oct 16 2013
23 comments
19,856 views