In SQL for giving an example in some fields I get data like "300.38383" for giving an example and I only need the first 2 decimal places after the round point
What functions are there so that only the first 2 rounded decimals are thrown
In SQL for giving an example in some fields I get data like "300.38383" for giving an example and I only need the first 2 decimal places after the round point
What functions are there so that only the first 2 rounded decimals are thrown
To format numbers in sql server, you can use the FORMAT function
FORMAT (value, format [ culture])
The function receives the value, and the type of format. For numeric formats, to two decimals, you can use a standard format like 'N', which formats to two decimals automatically.
Format(300.38383,'N')
Return
300.38
For reference, there is the documentation here