Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outer Join Assistance Help???

Status
Not open for further replies.

smurfer

Programmer
Jun 8, 2001
57
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top