Com And Hosting

Here is the little script to convert number to char and trailing with $ symbol.

select new_cost,
to_char( old_cost,'$999,99,999') as original_cost
 from cpt_products;

It displays result like –

12227          $6,000
4076          $2,000
5095          $2,500
20379         $10,000
12737          $6,250

2 thought on “Formatting report column in currency in Oracle”
  1. If we would apply to_char(old_cost,’$999,99,999′) than the numeric value will be converted into character value. By doing this we shall not able to sort on this colum and to get aggregate sum in Oracle APEX Report.

    What do you say?

    1. Yes, in this case I would suggest to use report column formatting which will not convert to numeric value to char even though it will display currency format in report view. I guess this is basically for generating custom report through TOAD or SQL developer. You can still sort the column but it sorting will treat as char instead of number :(.

Leave a Reply

Your email address will not be published. Required fields are marked *