Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger Error

Status
Not open for further replies.

kvang

Programmer
Oct 7, 2005
129
US
I am trying to build a trigger with the below script. When I try to execute it, I am getting an error. I've google to find a resolution but could not find anything. The trigger seems correct. Can you help?

CREATE OR REPLACE TRIGGER BK_WOBPENDED_TRIG
AFTER INSERT ON REPORT.BKAUDITLOG
FOR EACH ROW
WHEN (New.F_EVENTTYPE = 360 AND New.T_ACTION = 'Pend')
BEGIN
INSERT INTO BK_WOBPENDED VALUES :)New.AUDITLOGID, :New.F_WOBNUM, :New.T_WORKTYPE, :New.T_STEPNAME, :New.F_USERID, :New.F_STARTTIME, :New.F_ENQUEUETIME, :New.T_PENDTIME, :New:F_DURATION, :New.T_PENDREASONCODE, :New.ACCOUNTNO);
END;
/

It produces error code: 24344

2/171 PLS-00049: bad bind variable 'NEW'
2/175 PLS-00049: bad bind variable 'F_DURATION'
2/175 PLS-00103: Encountered the symbol "" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in mod not range rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || indicator is dangling
The symbol "(" was substituted for "" to continue.
2/226 PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( ) , * % & | = - + < / > at in mod not range rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || is dangling
The symbol ")" was substituted for ";" to continue.

 
Hi

Is there really a semicolon ( : ) in front of F_DURATION in :New[red]:[/red]F_DURATION ? Change it to period ( . ).
Code:
[gray]-- ...[/gray]
:New.T_STEPNAME, :New.F_USERID, :New.F_STARTTIME, :New.F_ENQUEUETIME, :New.T_PENDTIME, :New[red][b].[/b][/red]F_DURATION, :New.T_PENDREASONCODE, :New.ACCOUNTNO);
END;
/

Feherke.
 
That was my problem. I must've missed it. Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top