How do I get only the numbers after the decimal?
Example: 2.938
= 938
Use TRUNC(158.96) to get the digits before decimal point. no need to remove the decimal part for comparison.
SQL Server ROUND() Function The ROUND() function rounds a number to a specified number of decimal places. Tip: Also look at the FLOOR() and CEILING() functions.
try this:
SELECT (num % 1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With