S
Steve
I have a table that contains a list of ITEMS (end products)
I have a table that contains a list of PARTS used to build an ITEM (a bill
of material for each item)
I want to update a field in the first table with the sum of the quantity of
parts where a PARTS number is not equal to "WC*" and obviously the ITEMS
match.
So this is what I came up with:
"Update tblA inner join tblB on tblA.item = tblB.item set tblA.comp_count =
sum(tblB.quantity) where ((left(tblB.component,4) <> 'WC[R') and
(left(tblB.component,4) <> 'WC[A'));"
I get an error that the comp_count is not part of the aggregate. Am I in the
right direction or is there some better way to do this?
I have a table that contains a list of PARTS used to build an ITEM (a bill
of material for each item)
I want to update a field in the first table with the sum of the quantity of
parts where a PARTS number is not equal to "WC*" and obviously the ITEMS
match.
So this is what I came up with:
"Update tblA inner join tblB on tblA.item = tblB.item set tblA.comp_count =
sum(tblB.quantity) where ((left(tblB.component,4) <> 'WC[R') and
(left(tblB.component,4) <> 'WC[A'));"
I get an error that the comp_count is not part of the aggregate. Am I in the
right direction or is there some better way to do this?