Y
Yeti
HI all,
I need some help constructing a query (or a suite of queries!).
I want to work out what Cocktails I can make given the drinks I have
in my drinks cabinet. I have a table of Cocktail names, a table of
ingredients names and a join table that links the cocktails with their
ingredients (breaking the many to many between tblCocktails and
tblIngredients).
I want to be able to select between 2 and 6 drinks (ingredients) that
I have in my drinks cabinet and the query(S) to return to me the most
suitable cocktails I can make. So if I say I have Vodka, Orange Juice
and Champagne it will return a "Russian Brunch" - which uses all
three, a "Screwdriver" - which is Vodka and Orange Juice, a "Bucks
Fizz" - which is Champagne & Orange Juice but not a "Flubber" which is
Vodka, Orange Juice and Sambuca.........
If I can do this I then want to be able to order my results by the
"closest match" i.e. the cocktails at the top of the list will be the
ones that use most of the ingredients, then next will come those that
only use two of the ingredients, and then next those that only use one
of the ingredients I have.....
I've tried various methods but I can't seem to find a solution...
Many thanks in advance.
Yeti
I need some help constructing a query (or a suite of queries!).
I want to work out what Cocktails I can make given the drinks I have
in my drinks cabinet. I have a table of Cocktail names, a table of
ingredients names and a join table that links the cocktails with their
ingredients (breaking the many to many between tblCocktails and
tblIngredients).
I want to be able to select between 2 and 6 drinks (ingredients) that
I have in my drinks cabinet and the query(S) to return to me the most
suitable cocktails I can make. So if I say I have Vodka, Orange Juice
and Champagne it will return a "Russian Brunch" - which uses all
three, a "Screwdriver" - which is Vodka and Orange Juice, a "Bucks
Fizz" - which is Champagne & Orange Juice but not a "Flubber" which is
Vodka, Orange Juice and Sambuca.........
If I can do this I then want to be able to order my results by the
"closest match" i.e. the cocktails at the top of the list will be the
ones that use most of the ingredients, then next will come those that
only use two of the ingredients, and then next those that only use one
of the ingredients I have.....
I've tried various methods but I can't seem to find a solution...
Many thanks in advance.
Yeti