[dba-SQLServer] Percentages

Francisco Tapia fhtapia at gmail.com
Thu Mar 2 18:44:53 CST 2006


I think you'd have to cast it..but then it'll be a text (string) value

On 3/1/06, Darren HALL <darrend at nimble.com.au> wrote:
>
> 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
>
>
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>


--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...



More information about the dba-SQLServer mailing list