Help Error ORA-01422 ORACLE

0

I created a trigger so as not to insert the same user with the same chat two or more times, but I miss this error

exact fetch returns more than one requested number of rows tips

This is my trigger:

CREATE OR REPLACE TRIGGER OCEX_VERIFICAR_CHARLA
BEFORE INSERT OR UPDATE OF ID_CHARLA, CIP_PER ON OCEX_CHARLA_PERSONAL_PNP
FOR EACH ROW
DECLARE 
    cip varchar2(8);
    charla number(38);
BEGIN
    select cip_per into cip from OCEX_CHARLA_PERSONAL_PNP;

    select id_charla into charla from OCEX_CHARLA_PERSONAL_PNP;

    if (cip = :new.cip_per and charla = :new.id_charla) then
        RAISE_APPLICATION_ERROR(-20018,'NO SE PUEDE REGISTRAR EL MISMO USUARIO EN UNA MISMA CHARLA');
  end if;
END;

Some idea of why this error jumps and that should change in trigger, thanks.

    
asked by Stalinn 07.08.2018 в 20:22
source

0 answers