From: tasha on
That worked perfectly! Thank you for honoring me by responding.

"Jerry Whittle" wrote:

> I'm honored!
>
> SELECT Tasha.lngzSKU,
> Min(Tasha.blnFish) AS MinOfblnFish,
> Min(Tasha.blnMilk) AS MinOfblnMilk,
> Min(Tasha.[blnShelled(raw)]) AS [MinOfblnShelled(raw)],
> Min(Tasha.blnWheat) AS MinOfblnWheat,
> Min(Tasha.blnEgg) AS MinOfblnEgg,
> Min(Tasha.blnsoy) AS MinOfblnsoy,
> Min(Tasha.[blnShelled(ing)]) AS [MinOfblnShelled(ing)]
> FROM Tasha
> GROUP BY Tasha.lngzSKU
> ORDER BY Tasha.lngzSKU;
>
> Change Tasha with the real table name.
>
> Basically it's just a totals query grouped by IngzSKU and selecting the
> Minimum of each of the fields.
>
> This works, but the core problem is your table structure. Instead of going
> across like a spreadsheet, the records should go down something like this:
>
> lngzSKU Ingredient
> 38505 blnFish
> 38505 blnWheat
> 38505 blnMilk
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
> "tasha" wrote:
>
> > Jerry,
> >
> > I am having an issue similiar to the one posed by Bill B under the post:
> > "Return One Record Per Individual" on 3/23/10. The difference for me is that
> > I am trying to determine an allergen statement based on ingredients used.
> >
> > This is some examples of what I'm getting:
> > lngzSKU blnFish blnShelled(raw) blnWheat blnMilk blnEgg blnSoy blnShelled(ing)
> > 38505 -1 0 -1 -1 0
> > 0 0
> > 38526 -1 0 -1 -1 -1
> > -1 0
> > 38526 -1 0 -1 -1 0
> > 0 0
> > 410143 -1 0 -1 -1 -1
> > -1 0
> > 410143 -1 0 -1 -1 0
> > 0 0
> > 410143 -1 0 -1 0 0
> > 0 0
> >
> > What I want is:
> > lngzSKU blnFish blnShelled(raw) blnWheat blnMilk blnEgg blnSoy blnShelled(ing)
> > 38505 -1 0 -1 -1 0
> > 0 0
> > 38526 -1 0 -1 -1 -1
> > -1 0
> > 410143 -1 0 -1 -1 -1
> > -1 0
> >
> > I've already posted a question entitled "Repetivie Results", but any help
> > you can give would be appreciated.
 | 
Pages: 1
Prev: Russian chart titles
Next: copy and paste command