scgibson
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by scgibson
-
-
Hi,I have the following table Part Qty Date D 4 13/08/2012A 10 14/08/2012B 15 14/08/2012C 10 14/08/2012 and need to summarise row 'A' and 'B', keeping part 'A' name but a total for both 'A' and 'B'. Like below: Part Qty Date A 25 14/08/2012C 10 14/08/2012D 4 13/08/2012 Is this possible?Thanks,Stu
Summarise Data Keeping First Rows Value
in SQL
Posted
I tried as suggested above SELECT mrp_part, SUM(mrp_qty) as quantity, mrp_due_dateFROM vwMRPGrossReqFilteredGROUP BY mrp_part, mrp_due_date however, it doesnt summarise correctly due to the grouping of the part. I need to summarise IF part = 'A' and part = 'B' else just return the value of each individual part thus D 4 13/08/2012A 10 14/08/2012B 15 14/08/2012C 10 14/08/2012should look likePart Qty DateA 25 14/08/2012C 10 14/08/2012D 4 13/08/2012