[dba-SQLServer] Percentages

Darren HALL darrend at nimble.com.au
Wed Mar 1 17:52:44 CST 2006


Hi All
Cross posted to AccessD list
 
Got a percentage format Q
 
Is it possible to do the calcs and display the end result as a percentage
actually in the column
rather than do the converts and formats on the form or report?
 
EG
select ac.Description, sum(s.TotalCost), '% - ????'

from InvoiceChargeSummary s 

join AccountCostCentre ac on

          s.AccountNo = ac.AccountNo

where s.InvoiceNo = @InvoiceNo

returning:

AUBURN                  50.00          20%

MELBOURNE             100.00          40%

WA                        100.00          40%

Many thanks
 
DD
 
 
 



More information about the dba-SQLServer mailing list