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!

How to get the exact line number where the error occured

rtenaliMar 10 2020 — edited Mar 11 2020

Hi All,

I'm new to this community.

I want to find the exact line number where the error occurred in the current transaction, how can I write the cod. Please help me.

DECLARE

    v_vchar VARCHAR2(3);

BEGIN

    v_vchar := 1234;

EXCEPTION

    WHEN OTHERS THEN

        BEGIN

            v_vchar := 3456;

        EXCEPTION

            WHEN OTHERS THEN

                v_vchar := 9999;

        END;

END;

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

ORA-06512: at line 11

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

ORA-06512: at line 8

ORA-06502: PL/SQL: numeric or value error: character string buffer too small

ORA-06512: at line 4

Thanks in advance.

This post has been answered by jaramill on Mar 10 2020
Jump to Answer
Comments
Post Details
Added on Mar 10 2020
6 comments
11,385 views