Sunday 30 June 2019

1000 separator in sql server


While we are creating the reports some time as per the client requirement we need to display the amount value in 1000 separator.
With the help of the FORMAT () function, we can easily get it.

 Here more about FORMAT (): Format Function SQL Server

See the example
SELECT FORMAT(128922245,'#,0.00')
SELECT FORMAT(1233322345,'#,0.00')
Select CAST(CONVERT(varchar, CAST(123342456 AS money), 1) AS varchar)
Output



Popular Posts