T
tasha
I'm trying to design an allergy statement query. Some of our products have 4
different batters so I made 4 separate queries using this statement:
SELECT [tblComponent_Table (Raw_material_BOM)].lngzSKU, [tblComponent_Table
(Raw_material_BOM)].chr1st_Batter, [tblComponent_Table
(Raw_material_BOM)].chr1st_Batter_Name, tblIngredients.[blnNon-Allergens],
tblIngredients.blnWheat, tblIngredients.blnMilk, tblIngredients.blnEgg,
tblIngredients.blnSoy, tblIngredients.[blnCrustacean(ing)],
tblIngredients.blnTree_Nuts
FROM tblIngredients INNER JOIN [tblComponent_Table (Raw_material_BOM)] ON
tblIngredients.chrBatter = [tblComponent_Table
(Raw_material_BOM)].chr1st_Batter;
I then did a union query which works great except when two or more
ingredients have different allergen statements. Say one has wheat and
another has wheat AND milk (or one has wheat and another has soy), but they
are both being used in the same product. Is there a way to get one concise
answer that will state all present allergens?
different batters so I made 4 separate queries using this statement:
SELECT [tblComponent_Table (Raw_material_BOM)].lngzSKU, [tblComponent_Table
(Raw_material_BOM)].chr1st_Batter, [tblComponent_Table
(Raw_material_BOM)].chr1st_Batter_Name, tblIngredients.[blnNon-Allergens],
tblIngredients.blnWheat, tblIngredients.blnMilk, tblIngredients.blnEgg,
tblIngredients.blnSoy, tblIngredients.[blnCrustacean(ing)],
tblIngredients.blnTree_Nuts
FROM tblIngredients INNER JOIN [tblComponent_Table (Raw_material_BOM)] ON
tblIngredients.chrBatter = [tblComponent_Table
(Raw_material_BOM)].chr1st_Batter;
I then did a union query which works great except when two or more
ingredients have different allergen statements. Say one has wheat and
another has wheat AND milk (or one has wheat and another has soy), but they
are both being used in the same product. Is there a way to get one concise
answer that will state all present allergens?