I have two tables, like this:
tblInventory
ID | Size | Add'l Fields...
1 | 2
2 | 4
3 | 6
4 | 7
5 | 10
tblRequests
ID | ReqSize | Add'l Fields...
1 | 2.5
2 | 4
3 | 7.25
I want to write a query that will match up requests with the closest size--basically, where the record has the minimum ABS(Size-ReqSize). The ideal query would return:
qryMatch
ReqID | InvID
1 | 1
2 | 2
3 | 4
How can I write a query to join tables when the records don't match, they're just the closest match?
Thanks!
Dan