View Single Post
Old 08-20-2004, 08:11 AM   #3 (permalink)
welshbyte
Insane
 
Location: Wales, UK, Europe, Earth, Milky Way, Universe
Please note this is totally untested but it seems logical to me and should be syntactically correct. Its worth a try anyway. SQL gurus reading this may have a more efficient way to do it too, i'm far from an expert. Anyway, here goes:
Code:
SELECT *
FROM RECIPE
WHERE RECIPEINGREDIENT.RecipeID = RECIPE.RecipeID
AND RECIPEINGREDIENT.IngredientID = INGREDIENT.IngredientID
AND (INGREDIENT.IngredientName LIKE 'Eggs' OR INGREDIENT.IngredientName LIKE 'Bacon');
I've used 'Eggs' and 'Bacon' as examples here but more ingredients would be added by extending with more OR's between the parentheses.

Worth a try

welshbyte
__________________
There are only two industries that refer to their customers as "users". - Edward Tufte
welshbyte is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62