REMOVE zeros from a number

0

Good afternoon I'm new to sql programming and I've been researching how to remove zeros at my rates, for example I have rates in the same column 0.7550 100.00 but in my report I do not want to show decimals 00 on the right side and only show 0.75 100 Please your kind help Thanks in advance

    
asked by Joshua Toala 11.12.2018 в 21:05
source

2 answers

0
select cast(campo as decimal(16,2)) as alias from tabla

This I consider to be the ideal consultation for your case, I hope you will be useful brother.

    
answered by 11.12.2018 в 23:37
-1

With this query that I indicated you would return the number without decimals:

SELECT CAST(ROUND(CAMPO,0,1) AS int) As valor FROM TABLA

I hope it serves you.

Greetings

    
answered by 13.12.2018 в 10:42