Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

2 digit decimal

733799Oct 23 2019 — edited Oct 24 2019

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.

This post has been answered by KayK on Oct 24 2019
Jump to Answer
Comments
Post Details
Added on Oct 23 2019
7 comments
571 views