I'm trying to write a trigger that get a QuoteNumber from table 1 and updates it into table 2 where ShippingIdentity matches the records in both tables. The problem is the QuoteNumber is being inserted into it's own row(record) Can anyone please let me know why? Thanks.
ALTER TRIGGER ShippingQuoteNumber
UPDATE ShippingInfo SET QuoteNumber = a.QuoteNumber FROM AccountInfo a INNER JOIN inserted t ON t.ShippingIdentity = a.ShippingIdentity