Skip to content
Advertisement

Tag: formatting

number formatting 9’999.00

I’d like to format a number in a SQL select like this How can I do this? It works for 9,999,999 with the following command Answer You are almost there. Just replace group separator (.) with a single quote (‘) and you are good to go. result:

Formatting bigdecimals sql oracle

To have a readable big numbers under oracle and to facilatet the reading, I’m looking for a way to add blank space to obtain something like that: 213537592384.236 ===> 213 537 592 384.236 The problem that I have big numbers like above. Answer Spaces are a curious separator, and not directly supported by to_char(). However, you can format with commas

SQL server 2012 SP_HELPTEXT extra lines issue

I am using SQL server 2012, & always use SP_HELPTEXT to get my previously created Stored Procedures, In previous versions of SQL server there were no issues in this process but in 2012, My Stored Procedures come with extra lines, for example this is the procedure that I wrote Now after using SP_HELPTEXT with this procedure (or any other procedure),

Remove trailing zeros from decimal in SQL Server

I have a column DECIMAL(9,6) i.e. it supports values like 999,123456. But when I insert data like 123,4567 it becomes 123,456700 How to remove those zeros? Answer A decimal(9,6) stores 6 digits on the right side of the comma. Whether to display trailing zeroes or not is a formatting decision, usually implemented on the client side. But since SSMS formats

Advertisement