1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19:
create trigger tr_BatchProcessShipments_I on BatchProcessShipments after INSERT AS begin if(select * from inserted where "status" <>'Shipped')return; insert into Xcarriershipping(shippingno, handlingunitid, Company, contact, phone, add1, add2, city, state, zipcode, country, email, noofpacks, weight, unit, shipmethod, recpno, dim, payment, center, currency, customval, packdetails, trackingno, prono, shipcost, discount, userid, pwd, date, delno, carrier, qty, senderid, ltlclass, status, canceldate, img, interface, pono, invno, shiptofax, shiptohold) select "sid", BatchNo, shiptocompany, shiptocontact, shiptophone, shiptoaddressline1, shiptoaddressline2, shiptocity, shiptostate, shiptopostalcode, shiptocountry, '', packagetotal, packageweight, 'LBS', "service", accountnumber, '', paymentterms, '', 'USD', '', '', trackingnumber, '', Freight, '0', 'Admin', '', shipdate, 'Delivery Doc Number', carrier, '', plantid, '0', "status", '', '0x', 'BATCH', '', '', '', '' from inserted end go