
How to use more than 1 statement in the action lists of a tri
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C14B47.682C75F0
Content-Type: text/plain
That should be a comma between the 2 deletes not a semi-colon
Regards,
Bill Dare
Quote:
> -----Original Message-----
> Sent: Tuesday, October 02, 2001 3: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.
------_=_NextPart_001_01C14B47.682C75F0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: How to use more than 1 statement in the action lists of a =
trigger ?</TITLE>
</HEAD>
<BODY>
<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">That should be a =
comma between the 2 deletes not a semi-colon</FONT>
</P>
<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Regards,</FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">Bill Dare</FONT>
</P>
<UL>
Quote:
<P><FONT SIZE=3D1 FACE=3D"Arial">-----Original Message-----</FONT>
<BR><B><FONT SIZE=3D1 FACE=3D"Arial">From: </FONT></B> <FONT =
<BR><B><FONT SIZE=3D1 FACE=3D"Arial">Sent: </FONT></B> <FONT =
SIZE=3D1 FACE=3D"Arial">Tuesday, October 02, 2001 3:02 AM</FONT>
<BR><B><FONT SIZE=3D1 =
FACE=3D"Arial">To: </FONT></B> <FONT SIZE=3D1 =
<BR><B><FONT SIZE=3D1 =
FACE=3D"Arial">Subject: </FONT>=
</B> <FONT SIZE=3D1 FACE=3D"Arial">How to use more than 1 statement in =
the action lists of a trigger ?</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Dear All:</FONT>
</P>
<BR>
<BR>
<P> <FONT SIZE=3D2 =
FACE=3D"Arial">I've tried the following statement , but it =
fails:</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">create trigger trigger1</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">delete on member</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">referencing OLD as oldtable</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">for each row</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">(delete from pointlog where =
account=3Doldtable.account;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">delete from issuelog where =
account=3Doldtable.account;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">);</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
</P>
<P> <FONT SIZE=3D2 =
FACE=3D"Arial">But if I remove one of the actions , it works.</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Arial">I have to execute more than 1 statement in this trigger =
event, how should</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I compose of my SQL statement =
?</FONT>
</P>
<P> <FONT SIZE=3D2 =
FACE=3D"Arial">Thanks in advance.</FONT>
</P>
<P> <FONT SIZE=3D2 =
</P>
</UL>
</BODY>
</HTML>
------_=_NextPart_001_01C14B47.682C75F0--