I'm using three queries to match records on Date and Time to the minute. My current query works when there is an exact match
qry_Glassing returns a set of records that includes DateTime from table Glassing.
qry_Furnace formats the DateTime to the minute on table Furnace.
qry_Temp7 joins qry_Glassing and qry_Furnace on DateTime.
Here is my current query:
SELECT qry_Glassing.DateTime AS GlassingTime, qry_Glassing.Etch_Lot, qry_Glassing.PN, qry_Furnace.DateTime AS FurnaceTime, qry_Furnace.Temp7_AVE
FROM qry_Glassing INNER JOIN qry_Furnace ON qry_Glassing.DateTime = qry_Furnace.DateTime
ORDER BY qry_Furnace.DateTime;
6/6/2013 12:07 PM
When there is not an exact match for each record, I need the next record that is closest to the minute: