G
Guest
I want to update one date field from another date field when the first date
field is null.
Table1 is called BrfDates
SSN Date1
888222123
888333123 3/1/3006
888444564
Table2 is called GtDates
SSN Date2
888222123 1/1/1999
888333123 2/1/1999
888444564 3/1/1999
I would like an update query to return data to the BrfDates table, filling
in the empty Date1 field with the related Date2. Existing BrfDate.Date1
would stay in place.
I have a (see below) query which runs, but doesnt update anything to Date1.
I think it is because I have the same field in the SET line and also the
WHERE line, but I dont know how to do it differently.
Is there a better way to do this update?
UPDATE BrfDates
INNER JOIN GtDates
ON BrfDates.SSN = GtDates.SSN
SET BrfDates.Date1 = GtDates.Date2
WHERE (((BrfDates.Date1) Is Null));
Thanks
field is null.
Table1 is called BrfDates
SSN Date1
888222123
888333123 3/1/3006
888444564
Table2 is called GtDates
SSN Date2
888222123 1/1/1999
888333123 2/1/1999
888444564 3/1/1999
I would like an update query to return data to the BrfDates table, filling
in the empty Date1 field with the related Date2. Existing BrfDate.Date1
would stay in place.
I have a (see below) query which runs, but doesnt update anything to Date1.
I think it is because I have the same field in the SET line and also the
WHERE line, but I dont know how to do it differently.
Is there a better way to do this update?
UPDATE BrfDates
INNER JOIN GtDates
ON BrfDates.SSN = GtDates.SSN
SET BrfDates.Date1 = GtDates.Date2
WHERE (((BrfDates.Date1) Is Null));
Thanks