(inserted) الكود التالي لا يقبل كلمة
أبدآ أرجو المساعدة
use std go CREATE TRIGGER dbo.tb_term ON dbo.total_marks AFTER INSERT AS BEGIN if ( Select sub_no from sub_hold where reg_no= INSERTED.reg_no and term_no = Inserted.term_no and level_no= Inserted.level_no )>=1 -- SET NOCOUNT ON added to prevent extra result sets from <span style='color:orange'>-- interfering with SELECT statements. declare @sumsub float declare @sumsub_h float declare @sum_term float select @sumsub= total_h_m from total_marks where reg_no= Inserted.reg_no and term_no= Inserted.term_no and level_no=Inserted.level_no Select @sumsub_h=sum(dbo.subjects.h_no) FROM dbo.subjects INNER JOIN dbo.total_marks ON dbo.subjects.sub_no = dbo.total_marks.sub_no where reg_no=Inserted.reg_no and total_marks.term_no =Inserted.term_no and total_marks.level_no=Inserted.level_no update term_mark set total_pm = total_pm + (@sumsub/@sumsub_h) where term_no= Inserted.term_no and level_no = Inserted.level_no -- Insert statements for trigger here END GO
