cancel
Showing results for 
Search instead for 
Did you mean: 

how to keep decimal in sql query

mat_mat
Active Participant
0 Kudos

Dear Expert,

I try to do calculation in sql query, but it will automatically remove the decimal point.

This is my query:

SELECT 719 / 100

And i want a result = 7.19, but its not work. Its return 7.

i did try to use, SELECT ROUND(719/100,2), but its not working too...

Does any one have any idea how to get 7.19

Thanks in advance for any reply.

Regards,

Mat

Accepted Solutions (0)

Answers (1)

Answers (1)

mat_mat
Active Participant
0 Kudos

yes, i have answer already.

select cast(719/(100*1.0)as decimal (16,2))