` Printed Icetips Article

Icetips Article



Par2: Totalling a computed field in SQL
2007-12-10 -- J Shankar
 
select ID, sum(QTY), Sum(Extension), Sum(DiscountExt),
       Sum(Case When discountext = 0 then 
          extension 
      else discountext end) AS 'SoldPrice'
 from partsolds
 group by ID



Printed November 21, 2024, 7:00 am
This article has been viewed/printed 35233 times.