I have this calculation I have in a script:
ROUND(T3.NUM_POINTS * 1.0 / T4.TOTAL_RECORDS * 100,2) AS NUM_POINTS_PERCENT,
It produces this:
0.820000000000
I only want 2 decimals to be displayed so the answer should be 0.82. Another example,
0.900000000000
This should be 0.90
How can I modify the format so the unneeded zeros are removed?
Thank you
Cast as Decimal?
SELECT CAST(154399.234 AS DECIMAL(17,2));
March 1, 2024 at 12:20 am
thank you it worked!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy