Select * from Temp
--------------------------------------------- PlateName PlateType Qty Cost Rate Machine --------------------------------------------- P.S Medium 4 1600.00 400.00 SM101 P.S Short 4 1600.00 400.00 SM101 P.S Short 4 1600.00 400.00 SM101 P.S Short 4 1600.00 400.00 SM101 P.S Short 4 1600.00 400.00 SM101 P.S Short 4 1600.00 400.00 SM101 CTP Short 4 1200.00 300.00 SM101 CTP Short 4 1200.00 300.00 SM101 CTP Short 4 1200.00 300.00 SM101 CTP Short 4 1200.00 300.00 SM101 CTP Short 4 1200.00 300.00 SM101 ---------------------------------------------
SELECT PlateName, PlateType, sum(Qty) Qty, sum(Cost) Cost, Rate, Machine FROM TempPlates WHERE PlateType='short' and PlateName='P.S' GROUP BY Rate,Machine,PlateType,PlateName
PlateName PlateType Qty Cost Rate Machine ------------------------------------------------- P.S Short 20 8000.00 400.00 SM101 -------------------------------------------------
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)