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

Multiple Create Triggers Statements 1

Status
Not open for further replies.

psychoflea

Programmer
Dec 29, 2003
12
GB
Hi all

Bit of a basic question, but I have multiple trigger that I want to create to different table in one statement.

Example

CREATE TRIGGER rateaud ON [dbo].[exrate]
FOR INSERT,UPDATE
AS
Begin
........
End

CREATE TRIGGER forcastaudit ON [dbo].[forecast]
FOR UPDATE
AS
begin
.........
End

However when I run this I get a syntax error on the second Create statement, how do I let sql know when the first Create statement has finished so that it can start the next one

Many Thanks
 
or COMMIT TRANSACTION

create my trigger
COMMIT TRANSACTION
create my trigger
COMMIT TRANSACTION
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top