Forums

This topic is locked

sql statement part 2

Posted 03 Dec 2005 17:22:01
1
has voted
03 Dec 2005 17:22:01 fuku kawakami posted:
i have tried this sql statement

<b>From recipe_ingredients_table d
Join recipe_desc r
On d.recipe_id = r.recipe_id
Join ingredient_desc i
On d.ingredient_id = i.ingredient_id
Where i.ingredient_name ='salt'
And recipe_name In (Select recipe_name
From recipe_ingredients_table d
Join recipe_desc r
On d.recipe_id = r.recipe_id
Join ingredient_desc i
On d.ingredient_id = i.ingredient_id
Where i.ingredient_name = 'egg')
And recipe_name In (Select recipe_name
From recipe_ingredients_table d
Join recipe_desc r
On d.recipe_id = r.recipe_id
Join ingredient_desc i
On d.ingredient_id = i.ingredient_id
Where i.ingredient_name = 'butter');</b>



but it doesn't run with %% in the quotes in order to return me everything! does anybody know why??? i cannot understand it! when i put inside the quotes ingredients then it returns me the values that fullfil the requirements of the sql statement

Reply to this topic