Home » SQL & PL/SQL » SQL & PL/SQL » String Formatting
String Formatting [message #193916] Tue, 19 September 2006 22:46 Go to next message
jazzyline
Messages: 1
Registered: September 2006
Junior Member
Hello,

I have the following:
select lpad(11.111,14,'0'), lpad('200.22',11,'0') from dual;
The output would be: 0000000011.111 and 00000200.22
I'm looking for:0,000,000,011.111 and 00,000,200.22
i.e., a comma separated string starting right to left from the decimal point.There has to be an interval of three chars between the commas. The string may have a decimal point or it may not and also The hard-coded numbers could vary in value as well as length.

Many Thanks

[Updated on: Tue, 19 September 2006 22:48]

Report message to a moderator

Re: String Formatting [message #193933 is a reply to message #193916] Wed, 20 September 2006 00:39 Go to previous message
aorehek
Messages: 52
Registered: August 2006
Member
select to_char( :your_number,'000,000,000.00') from dual
Previous Topic: Need to generate hierarchical recursive XML using SQL
Next Topic: Creating a dynamic cursor
Goto Forum:
  


Current Time: Wed Dec 07 12:42:16 CST 2016

Total time taken to generate the page: 0.05811 seconds