Switching database formats and all existing triggers are being rewritten in sql. The following uses only one table and needs to look for the first match based on the first nine digits of item and then update certain fields in the new item created....
CREATE TRIGGER boardsize ON item
FOR INSERT
as
update itm
set itm.uf_cswidth = i.uf_cswidth
from item itm
join ( select distinct substring(item,1,9) from item where item.product_code like 'lam%' ) i
on substring(itm.item,1,9) = substring(i.item,1,9)
Thanks
Dedra
CREATE TRIGGER boardsize ON item
FOR INSERT
as
update itm
set itm.uf_cswidth = i.uf_cswidth
from item itm
join ( select distinct substring(item,1,9) from item where item.product_code like 'lam%' ) i
on substring(itm.item,1,9) = substring(i.item,1,9)
Thanks
Dedra