Home » SQL & PL/SQL » SQL & PL/SQL » Two digit decimal
Two digit decimal [message #677926] Wed, 23 October 2019 20:09 Go to previous message
Satya.tanmay
Messages: 3
Registered: April 2017
Junior Member
Requirement
Need result in 8digit,(comma not dot) then 2decimal digit i.e. 12345678,90 or 00001234,50 (if value is less than 8 digit then lpad with 0)

I am using query as
select LPAD(replace(to_number(to_char(1234.7,'S999999990D99')),'.',','),11,'0') from dual

I am getting result as : 000001234,7 but i need result as 000001234,70
i.e. 0 at the right is missing.

How can get result as 000001234,70 and what should be my query.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Exist Value in a table
Next Topic: Cursor throwing error while passing to dbms_stats.gather_schema_stats
Goto Forum:
  


Current Time: Thu Apr 18 15:57:19 CDT 2024