AR: Update Product Classes in Sales Detail

From KeystoneIntranet
Jump to navigation Jump to search

Update the product class in Sales Detail table from the Product Table

update artslsdt d
set d.product_class=
  (select product_class from artprod p where p.product_code=d.product_code)
where d.product_class<>
  (select product_class from artprod p where p.product_code=d.product_code)