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-06550: Unable to debug pl/sql code

user8660054Aug 24 2016 — edited Aug 24 2016

HI all,

I am unable to find what is wrong with this part of the code, where I am getting ORA-06550 error. Any help would be appreciated.

/* Formatted on 24/8/2016 12:01:28 (QP5 v5.287) */

begin

            if (l_emisor = 4 and l_producto in (27, 50, 51, 52, 53, 54, 55))

            then

                -- DO_SERVICIOS TABLE

                insert into parruni6.DO_SERVICIOS (EMISOR, PRODUCTO, COD_SERVICIO, DO, FECHA_SERVICIO, FECHA_PROX_CUOTA, TIPO_DE_MONEDA, VALOR_1ER_VEZ, VALOR_EN_ADELANTE, BONIF_1ER_VEZ, BONIF_EN_ADELANTE, CUOTAS_VAN, CUOTAS_SON, COBRANDO, HIRED_DATE)

                values (l_emisor, l_PRODUCTO, 8, l_DO, l_FECHA_ESTADO, l_FECHA_ESTADO, 1, 25.04, 25.04, 50.00, 50.00, 1, 1, 1, l_FECHA_ESTADO);

            elsif (l_emisor != 21)

                -- DO_SERVICIOS TABLE

                insert into parruni6.DO_SERVICIOS (EMISOR, PRODUCTO, COD_SERVICIO, DO, FECHA_SERVICIO, FECHA_PROX_CUOTA, TIPO_DE_MONEDA, VALOR_1ER_VEZ, VALOR_EN_ADELANTE, BONIF_1ER_VEZ, BONIF_EN_ADELANTE, CUOTAS_VAN, CUOTAS_SON, COBRANDO, HIRED_DATE)

                values (l_emisor, l_PRODUCTO, 1, l_DO, l_FECHA_ESTADO, l_FECHA_ESTADO, 1, 25.04, 25.04, 50.00, 50.00, 1, 1, 1, l_FECHA_ESTADO);

            end if;               

        EXCEPTION

            when DUP_VAL_ON_INDEX then

                DBMS_OUTPUT.PUT_LINE('l_DO: ' || l_DO || ' - SQLCODE: '||SQLCODE || ' - SQLERRM: ' || SQLERRM || ' Line num: ' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE );               

        end;

Keep getting ora error:

11:46:24 295  /

                insert into parruni6.DO_SERVICIOS (EMISOR, PRODUCTO, COD_SERVICIO, DO, FECHA_SERVICIO, FECHA_PROX_CUOTA, TIPO_DE_MONEDA, VALOR_1ER_VEZ, VALOR_EN_ADELANTE, BONIF_1ER_VEZ, BONIF_EN_ADELANTE, CUOTAS_VAN, CUOTAS_SON, COBRANDO, HIRED_DATE)

                *

ERROR at line 275:

ORA-06550: line 275, column 17:

PLS-00103: Encountered the symbol "INSERT" when expecting one of the following:

* & = - + < / > at in is mod remainder not rem then

<an exponent (**)> <> or != or ~= >= <= <> and or like like2

like4 likec between overlaps || multiset year day member

submultiset

The symbol "then" was substituted for "INSERT" to continue.

ORA-06550: line 294, column 1:

PLS-00103: Encountered the symbol "END"

Regards,

Robert

This post has been answered by Saubhik Banerjee on Aug 24 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2016
Added on Aug 24 2016
4 comments
563 views