I have the following query which updates or appends one table from a second where certain criteria are equal, however prior to today all of the join fields were required entries, that has now changed and some/all can be null. I would like my query to do the same thing it does, however since some fields are null, the update process does not run, it simply appends the fields to the table. I do want it to check all of these fields to see if they are equal, however if some are equal and the others null in both, I would still want it to update. I am thinking it should be an outer join query but not sure how outer joins work with access?
UPDATE rates RIGHT JOIN [Linked Rates] ON
([rates].[Lane to Point]=[Linked Rates].[Lane to Point])
AND ([rates].[Lane from Point]=[Linked Rates].[Lane from Point])
AND ([rates].[Expiration Date]=[Linked Rates].[Expiration Date])
AND ([rates].[Effective Date]=[Linked Rates].[Effective Date])
AND ([rates].[SCAC]=[Linked Rates].[SCAC])
AND ([rates].[Commodity]=[Linked Rates].[Commodity])
AND ([rates].[Equipment Type]=[Linked Rates].[Equipment Type])
SET rates.scac = [Linked Rates].[scac],
rates.Mode = [Linked Rates].[Mode],
rates.[Load Class] = [Linked Rates].[Load Class]
***there are more fields here but not needed for the explanation...
Thanks,
SM
UPDATE rates RIGHT JOIN [Linked Rates] ON
([rates].[Lane to Point]=[Linked Rates].[Lane to Point])
AND ([rates].[Lane from Point]=[Linked Rates].[Lane from Point])
AND ([rates].[Expiration Date]=[Linked Rates].[Expiration Date])
AND ([rates].[Effective Date]=[Linked Rates].[Effective Date])
AND ([rates].[SCAC]=[Linked Rates].[SCAC])
AND ([rates].[Commodity]=[Linked Rates].[Commodity])
AND ([rates].[Equipment Type]=[Linked Rates].[Equipment Type])
SET rates.scac = [Linked Rates].[scac],
rates.Mode = [Linked Rates].[Mode],
rates.[Load Class] = [Linked Rates].[Load Class]
***there are more fields here but not needed for the explanation...
Thanks,
SM