Results 1 to 3 of 3

Thread: Conversion help

  1. #1
    Join Date
    Jun 2007
    Posts
    15

    Conversion help

    I've got a calculated field that is a percentage value. What I'm trying to do is purely cosmetic, but I still want to see if this can be done. When I run this query, I want a % symbol to show up after the value. Here's the SQL I have


    Round(([SumOfPending]+[SumOfInService]-[SumOfPending_Removal])/[SumOfTOTAL_STS],3)*100 AS UTILIZATION


    I've left other code out on purpose, but this is what I need worked on. I've looked up ways to use CAST, the only way I've found is to change it to a varchar and add the % at the end. Well, when I use varchar I get an error saying I tried using a reserved word etc etc.

    Thanks in advance

  2. #2
    Join Date
    Jun 2004
    Location
    South Africa
    Posts
    18
    Have you tried the incorporate the Format function in your string e.g. MyStr = Format(5, "0.00%") ' Returns "500.00%".

  3. #3
    Join Date
    Jun 2007
    Posts
    15
    That did it, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •