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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger

Status
Not open for further replies.

juergenkemeter

Programmer
Oct 6, 2004
27
NZ
Hello,

I want to make a SQL Trigger with Database Navigator.

Here is the SQL-Statement which I tried:
------------------------------------------------
WHEN (PRISTW - PRSOLLW) > 0
THEN SET newrow.PRABWEI = 'Entspricht'
ELSE SET newrow.PRABWEI = 'Entspricht nicht';
END
------------------------------------------------

it gives back the following message:
oken ) ungültig. Gültige Token: < > = <> <= !< !> != >= ¬< ¬> ¬= IN IS NOT LIKE BETWEEN.


can anyone help me with my SQL-Statement?

/Jürgen
 
Are you sure you need a trigger? A trigger basically performs an action when a certain event occurs. This looks more like a complete update of a field.

What in your case should trigger the event?

And what is the full DDL of the trigger........









Ties Blom
Information analyst
tbl@shimano-eu.com
 

Hi,
thanks for offering your help. I'm glad I recently found a solution to my problem:

---------------------------------------------------
WHEN (PRISTW is not NULL and PRSOLLW is not NULL)
BEGIN
CASE
WHEN PRISTW - PRSOLLW > 0
THEN SET newrow.PRABWEI = 'Entspricht';
ELSE
SET newrow.PRABWEI = 'Entspricht nicht';
END CASE;
END
---------------------------------------------------

Ciao
Jürgen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top