• itmasterw 60042 - Friday, April 20, 2018 11:39 AM

    Hi 
    I have this 
    OP_Percentage * 100 as 'OP %'
    OP_Percentage is a decimal(6,4) and if I try decimal(6,0 ) I just get 0
    in a select statement. this gives a result like 125.00% 
     need this to look like this 125%
    Any ideas?
    Thank you

    You can use format if you are an extremely patient person.
    Normally for presentation issues,  you want to handle that on the front end, in the application or report. In SQL Server, you can cast it to an int and then to a varchar so you can  add the percent sign.
    SELECT CAST(CAST(OP_Percentage * 100 as int) as varchar(10)) + '%'

    Sue