Hi.
I am trying to compare the fields of a record that has been added to an "order" with the analogous fields in the source data table that the ordering process draws them from. This way, I can recognize when one "order" has been created with a different version of the data in the source data table. But some of the fields can be left empty in either location. When I compare all the pertinent fields, changes are caught, but not when the field in either the source or "order" table is blank.
I have to catch these differences, as they define versions. i.e. RoadName = "" compared to RoadName = "Victoria Parkway"
Daniel Dillon
O o . (<--- brain shrinking at rate shown.)
I am trying to compare the fields of a record that has been added to an "order" with the analogous fields in the source data table that the ordering process draws them from. This way, I can recognize when one "order" has been created with a different version of the data in the source data table. But some of the fields can be left empty in either location. When I compare all the pertinent fields, changes are caught, but not when the field in either the source or "order" table is blank.
I have to catch these differences, as they define versions. i.e. RoadName = "" compared to RoadName = "Victoria Parkway"
Code:
SELECT A.ID, A.SiteListID, A.Subwatershed, A.Site, A.WatercourseName, A.Easting, A.Northing, A.Township, A.Lot, A.Con, A.RoadName
FROM qryFillTempTables AS B INNER JOIN qryTempSite AS A ON B.SiteID = A.SiteListID
WHERE (((A.SiteListID)=B.SiteID) AND ((A.Subwatershed)<>B.Subwatershed)) OR (((A.SiteListID)=B.SiteID) AND ((A.Site)<>B.SiteCode)) OR (((A.SiteListID)=B.SiteID) AND ((A.WatercourseName)<>B.WatercourseName)) OR (((A.SiteListID)=B.SiteID) AND ((A.Easting)<>B.Easting)) OR (((A.SiteListID)=B.SiteID) AND ((A.Northing)<>B.Northing)) OR (((A.SiteListID)=B.SiteID) AND ((A.Township)<>B.Township)) OR (((A.SiteListID)=B.SiteID) AND ((A.Lot)<>B.Lot)) OR (((A.SiteListID)=B.SiteID) AND ((A.Con)<>B.Con)) OR (((A.SiteListID)=B.SiteID) AND ((A.RoadName)<>B.RoadName));
Daniel Dillon
O o . (<--- brain shrinking at rate shown.)