D
Dale Palmer
I'm having trouble trying to get a Select Statement working, my current
statement is attached below.
I have two tables: Table one (tblProducts) is product description & Table
two (tblExtraProd) is a list of ingredients for each product.
I need to be able to select and ingredient that needs to be included and one
that needs to be excluded and get a result.
Any help or ideas would be very much appreciated.
Regards
Dale
SELECT seasonedpi.dbo.tblProducts.P_ID,
seasonedpi.dbo.tblProducts.DISPLAYNAME, seasonedpi.dbo.tblProducts.Cuisine,
seasonedpi.dbo.tblProducts.PType,
seasonedpi.dbo.tblProducts.mild, seasonedpi.dbo.tblProducts.sultry,
seasonedpi.dbo.tblProducts.spicy,
seasonedpi.dbo.tblProducts.explosive,
seasonedpi.dbo.tblProducts.volcanic, seasonedpi.dbo.tblExtraProd.ExProduct
FROM seasonedpi.dbo.tblProducts RIGHT OUTER JOIN
seasonedpi.dbo.tblExtraProd ON
seasonedpi.dbo.tblProducts.P_ID = seasonedpi.dbo.tblExtraProd.ExRelate
WHERE (seasonedpi.dbo.tblExtraProd.ExProduct <> 30) AND
(seasonedpi.dbo.tblExtraProd.ExProduct = 135)
statement is attached below.
I have two tables: Table one (tblProducts) is product description & Table
two (tblExtraProd) is a list of ingredients for each product.
I need to be able to select and ingredient that needs to be included and one
that needs to be excluded and get a result.
Any help or ideas would be very much appreciated.
Regards
Dale
SELECT seasonedpi.dbo.tblProducts.P_ID,
seasonedpi.dbo.tblProducts.DISPLAYNAME, seasonedpi.dbo.tblProducts.Cuisine,
seasonedpi.dbo.tblProducts.PType,
seasonedpi.dbo.tblProducts.mild, seasonedpi.dbo.tblProducts.sultry,
seasonedpi.dbo.tblProducts.spicy,
seasonedpi.dbo.tblProducts.explosive,
seasonedpi.dbo.tblProducts.volcanic, seasonedpi.dbo.tblExtraProd.ExProduct
FROM seasonedpi.dbo.tblProducts RIGHT OUTER JOIN
seasonedpi.dbo.tblExtraProd ON
seasonedpi.dbo.tblProducts.P_ID = seasonedpi.dbo.tblExtraProd.ExRelate
WHERE (seasonedpi.dbo.tblExtraProd.ExProduct <> 30) AND
(seasonedpi.dbo.tblExtraProd.ExProduct = 135)