I have an update query that checks to see if a certain number of semi-primary keys are equal and then either appends or updates the records. They are not true pk's but sort of act as them. However some of these pk's can be null, and my right join does not work on records containing nulls in any of the field, even when they are none in both tables being joined. Is it possible to use a right join with nulls somehow, if so please help! here is my code:
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