I am not sure how to express this in SQL, if possible, or even call it.
I want for each record in table A the first best matching record in table B that has not yet been selected as the best match. For example, suppose I have a general shopping list and food menu:
Table A Table B Generic Shopping List Food Menu --------------------- ---------------------- Food Type Food Food Type --------------------- ---------------------- Meat Tomatoes Vegetable Meat Lettuce Vegetable Vegetable Bacon Vegetable Vegetable Bacon Meat Vegetable Beef Meat Vegetable Apple Fruit Fruit Orange Fruit Fruit Bacon Fruit Dairy Milk Dairy Cheese Dairy Yogurt Dairy
Itβs easy to get Top 1 matching with a query or join:
Table/Query C Automagic Shopping
I know how to do this, and because I like bacon, I could live with it. Unfortunately, I really need the full width of the available food options, so I have slots for this.
Table/Query C Better Magic Shopping
If it can be done in Access, great. If this cannot be done in Access, but it can be done in another product, this is not ideal, but it works.
Thanks.
source share