Repetitive Results

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?
 
K

KARL DEWEY

Is there a way to get one concise answer that will state all present
allergens?
Search on Concatenate by Duane Hookom.
If that does not help then post back what your desired output would look like.
 
T

tasha

For the example 410143, just Wheat,Milk,Egg,Soy. For the example 38505, just
Wheat,Milk.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top