PL/SQL (MOSC)

MOSC Banner

Error in trigger

edited Jun 4, 2009 7:45AM in PL/SQL (MOSC) 2 commentsAnswered ✓
I created the trigger above:

create or replace
TRIGGER informa_alteracao
BEFORE UPDATE ON tab1
for each row
declare
campo_old,campo_new tab2.ds%TYPE;
BEGIN

if (:new.campo <> :old.campo) then

select ds into campo_old
from tab2
where campo = :old.campo;

select ds into campo_new
from tab2
where campo = :new.campo;

mensagem := "Setor antigo : " ||campo_old||"\n";
mensagem := mensagem || "Setor novo : "||campo_new||"\n";

envia_email_sgrh('email@servidor.com.br','Alteracao de Setor',mensagem);
end if;
END;

When I compilo, I get the errors above:

2/12 PLS-00103: Encountered the symbol "," when expecting one of the
following:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center