|
Try it with
CREATE trigger tr_fkpz on payment voucher
for insert
as
declare @CusName VARCHAR(100),
@Mname varchar(100),
@GradeName varchar(100),
@Jweight decimal,
@ID char(15),
@NUM int,
@count int
select @count=count(*) from ls
set @NUM=1
while @NUM<@count+1
begin
select @ID=ID from ls where NUM=@NUM
uPDATE App_Ponderation SET YS=1 where IDcode=@ID
SET @NUM=@NUM+1
end |
|