QUESTION POSED ON: 18 May 2007
I have a SQL query where I am trying to update a column in a
table (tblA) from data in another table (tblB). This works fine when I try
to update all the records in tblA, however, in this case I only have
missing data which I have identified and populated in tblB. When I try
to update only the missing data the non-matched data is also updated but
to NULL.
UPDATE tblA A
SET A.Fld1 = ( SELECT B.Fld1
FROM tblB B
WHERE A.Fld2 = B.Fld2 )
Is it possible to update only the missing data?
|