How to format numbers as Comma separated

Database

How to format numbers as Comma separated

I have to format numbers in the column as comma separated.

For example 

1000 should be 1,000

1234567 should be 1,234,567

5 REPLIES

Re: How to format numbers as Comma separated

In short I need to add commas to numbers for readability

Re: How to format numbers as Comma separated

 BTEQ -- Enter your SQL request or BTEQ command:

SELECT CAST(123456789.00 AS FORMAT 'G999999999D99');

 *** Query completed. One row found. One column returned.

 *** Total elapsed time was 1 second.

123456789.00

--------------

123,456,789.00

HTH.

Cheers.

Carlos.

Re: How to format numbers as Comma separated

Thanks Carlos. 

But this is not working in sql assistant.

Re: How to format numbers as Comma separated

Tools->Options->Answerset-> Check "Display 1000 separators in numeric columns"

HTH.

Cheers.

Carlos.

K_Y
N/A

Re: How to format numbers as Comma separated

Hi

 

How can we remove thousand separator from a numeric field ?

 

I have a filed which contains value like 234,56,78, while selecting I want to display the data as 2345678. How can it be achieved?

 

Thanks in advance !!!