Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
oldclocker
Starting Member
4 Posts |
Posted - 2001-06-06 : 11:26:49
|
| Why will the following code pass syntax check in SQL Query Analyzer in SQL 2000 Enterprise, but not run?-- =============================================-- Create trigger contained If UPDATE(column)-- =============================================IF EXISTS (SELECT name FROM sysobjects WHERE name = N'aog_alert' AND type = 'TR')DROP TRIGGER aog_alertGOCREATE TRIGGER aog_alertON AOG_list for UPDATE AS if inserted.status=1BEGINselect status,[tail],[description] from inserted as iselect status,[tail],[description] from deleted as ddeclare @textsub varchar(40)declare @mymess varchar(1000)declare @tail varchar(5)set @tail=[i.tail]set @mymess=[i.description]set @textsub='Aircraft '+ @tail +' AOG Alert Notice'exec xp_sendmail @recipients='ccombs@midwayair.com',@message=@mymess,@subject=@textsubENDGOEdited by - oldclocker on 06/06/2001 11:39:09Edited by - oldclocker on 06/06/2001 13:28:04Edited by - oldclocker on 06/06/2001 13:58:21Edited by - oldclocker on 06/06/2001 15:11:31 |
|
|
|
|
|