PLS-00103: Encountered the symbol ";" when expecting one of the following: [message #188288] |
Thu, 17 August 2006 17:21 |
superoscarin@hotmail.com
Messages: 101 Registered: July 2006 Location: Mexico
|
Senior Member |
|
|
I have a little problem with my trigger...Can you please help me??...
Here my trigger...
CREATE OR REPLACE TRIGGER dm08_inserta_catalogos
AFTER insert ON dm08_base_origen FOR EACH ROW
DECLARE
v_id_base_origen NUMBER;
BEGIN
select ID_BASE_ORIGEN INTO v_id_base_origen from (select Rownum Row#, ID_BASE_ORIGEN from DM08_BASE_ORIGEN WHERE ID_BASE_ORIGEN <> 1 ORDER BY 1 DESC)where ROWNUM<2;
IF v_id_base_origen <> 0 THEN
insert into DM08_RETENEDOR values(v_id_base_origen||99999,v_id_base_origen,'NO DEFINIDO');
insert into DM08_PARENTESCO values(v_id_base_origen||99,v_id_base_origen,'NO DEFINIDO');
insert into DM08_NIVEL_GOBIERNO values(v_id_base_origen||999,v_id_base_origen,'NO DEFINIDO');
insert into DM08_TIPO_PODER values(v_id_base_origen||999,v_id_base_origen,'NO DEFINIDO');
insert into DM08_UNIDAD_PAGO values('v_id_base_origen||99999',v_id_base_origen||99999,'NO DEFINIDO');
insert into DM08_TIPO_LOCALIZADOR values(v_id_base_origen||99,v_id_base_origen,'NO DEFINIDO');
insert into DM08_TIPO_ASEN values(v_id_base_origen||99,v_id_base_origen,'NO DEFINIDO');
insert into DM08_TIPO_PLAN values('v_id_base_origen||99999',v_id_base_origen,'NO DEFINIDO');
insert into DM08_ESTADO values(v_id_base_origen||99,v_id_base_origen,'NO DEFINIDO','ND');
insert into DM08_CIUDAD values(v_id_base_origen||99,99,'NO DEFINIDO');
insert into DM08_DELMUN values(v_id_base_origen||99,999,'NO DEFINIDO');
insert into DM08_COLONIA values(v_id_base_origen||99,99,999,v_id_base_origen||999,99999,v_id_base_origen||99,'NO DEFINIDO');
ELSE IF
DBMS_OUTPUT.PUT_LINE (v_id_base_origen|| 'no es un valor permitido' );
END IF;
END dm08_inserta_catalogos;
/
the message error is:
SQL> SHOW ERROR;
Errors for TRIGGER DM08_INSERTA_CATALOGOS:
LINE/COL ERROR
-------- -----------------------------------------------------------------
22/71 PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( * % & = - + < / > at in is mod not rem then
<an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
Thanks guys
Alex.
[Updated on: Thu, 17 August 2006 17:22] Report message to a moderator
|
|
|
|
|
|
|