Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
create trigger trOrders_insupd on orders FOR INSERT, UPDATE
as
declare @goodthreshhold INT
declare @totalValue INT
declare @cusid INT
set @goodthreshhold = 1000
set @cusid = inserted.cusid
if update (ordertotal)
select @totalValue = sum(ordertotal)
from orders where o.cusid=@cusid
group by ordertotal
if (@totalValue > @goodthreshhold)
update customers set type='Good' where cusid=@cusid