Search This Blog

Thursday, July 9, 2009

Update a table from another table

Below is the sql statement to update one table from another table.In the following case memodtl is getting update from podtl.

UPDATE memodtl
SET type=y.type, origin=y.origin, Grade=y.Grade, length=y.length, width=y.width, thickness= y.Thickness, MemoQty=y.Nos
FROM podtl y
WHERE memodtl.memono=y.pono and memodtl.memodt=y.podt and memodtl.revNo = y.RevNo and memodtl.RecNo=y.ReCno and memodtl.SeqNo = y.SeqNo

No comments:

Post a Comment