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!

format a number field to specific decimal places

KapilBJul 16 2014 — edited Jul 17 2014

Hi,

I have an amount field in a table as Number.  How do I fetch this field in a definitive decimal place value? Number of decimal places are configured in a table. lets say 6.

So if the value is 123.12 result should be 123.120000

if the value is 123.1234567, result should be 123.123456.

I know of to_char but that will require predefined format where is my format can change based on what's stored in configuration table for decimal place value.

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2014
Added on Jul 16 2014
13 comments
6,339 views