[SQL] [TRIGGER] Returning values from BEFORE UPDATE trigger, without using them

2010-07-23 Thread Torsten Zühlsdorff
Hello, i have a non-trival problem and i do not believe that it is solvable. I have defined an BEFORE UPDATE trigger. The trigger catch every update, change some columns of the new row, make an insert of the new row and returns null to abort the update. All fine till here :) Now the

[SQL] howto delete using a join ?

2010-07-23 Thread Andreas
Hi, is there a way to delete from a table using information from another table to decide if a row should be dropped? In my case there is a log events ( event_id, event_type_fk, ...); event_types ( event_type_id, relevance_level ); Now I'd like to delete all old events with certain