How to use more than 1 statement in the action lists of a trigger ? 
Author Message
 How to use more than 1 statement in the action lists of a trigger ?

Dear All:

        I've tried the following statement , but it fails:
=============================================================
create trigger trigger1
delete on member
referencing OLD as oldtable
for each row
(delete from pointlog where account=oldtable.account;
delete from issuelog where account=oldtable.account;
);
=============================================================

        But if I remove one of the actions , it works.
        I have to execute more than 1 statement in this trigger event, how should
I compose of my SQL statement ?

        Thanks in advance.




Sat, 20 Mar 2004 15:02:19 GMT
 How to use more than 1 statement in the action lists of a trigger ?

The only way i know, is to use a stored procedure

Quote:
----- Original Message -----


Sent: Tuesday, October 02, 2001 11:02 AM
Subject: How to use more than 1 statement in the action lists of a trigger ?

> Dear All:

> I've tried the following statement , but it fails:
> =============================================================
> create trigger trigger1
> delete on member
> referencing OLD as oldtable
> for each row
> (delete from pointlog where account=oldtable.account;
> delete from issuelog where account=oldtable.account;
> );
> =============================================================

> But if I remove one of the actions , it works.
> I have to execute more than 1 statement in this trigger event, how should
> I compose of my SQL statement ?

> Thanks in advance.





Sat, 20 Mar 2004 16:42:09 GMT
 How to use more than 1 statement in the action lists of a trigger ?

Quote:

> Dear All:

>         I've tried the following statement , but it fails:
> =============================================================
> create trigger trigger1
> delete on member
> referencing OLD as oldtable
> for each row
> (delete from pointlog where account=oldtable.account;
> delete from issuelog where account=oldtable.account;
> );
> =============================================================

>         But if I remove one of the actions , it works.
>         I have to execute more than 1 statement in this trigger event, how should
> I compose of my SQL statement ?

As it says in the manuals, use a comma to separate the statements -- not a
semi-colon.

Only SPL uses semi-colons to separate parts of a single statement.

--

Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>



Sun, 21 Mar 2004 12:18:28 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. How to use more than 1 statement in the action lists of a tri

2. Action that triggers a MDX Select statement

3. Using Action Statements in Office Pivot Tables

4. Arev 3.1 problem using OR in select and list statements

5. Using ALTER TABLE statement within a trigger...

6. Triggers on append using aggregate functions in an update statement

7. Using SELECT statement inside an INSTEAD OF UPDATE trigger

8. Using a waitfor statement in a trigger (one for the experts)

9. Using Oracl DDL-Statements in Procedures/Triggers on V. 7.3.2.2 and higher

10. Clicking action in a list object?

11. Executing Multiple Actions In A Case Statement

12. best way to trigger an external action


 
Powered by phpBB® Forum Software