Reputation: 211
I have an app build in Oracle APEX 18.2. Every number field in app have missing leading zero. For example when the number is 0.5
, APEX displays it as .5
. The problem occurs also in SQL Workshop. In SQL Developer numbers with leading zeros are formatted well, so I think this is problem with Oracle APEX, not with Oracle DB. Is there any global setting for number formatting in APEX?
Upvotes: 2
Views: 2710
Reputation: 849
I'll assume you have a Classic or Interactive Report, in such case:
Upvotes: 1
Reputation: 11
I had the same issue recently. i fixed it using to_char(xxx,'FM999G990D00')
SELECT mont.period_name AS PERIOD
, to_char(ivo.total_overtime,'FM999G990D00')
, to_char(emho.ACTUAL_TRANSFERRED_HOURS,'FM999G990D00')
, to_char(emho.actual_recup_days,'FM999G990D00')
FROM .....
worked like a charm
Upvotes: 1
Reputation: 11
I had an issue adding zeros to numbers, but it was fixed using Function with Oracle Developer
select LPAD((max(ID))+1, 6, '0') from Yourtable
and call it as a function.
Probably you could use PL/SQL expressions to fix it
Upvotes: 1
Reputation: 143023
As far as I can tell, there's no such a global setting, which means that you'd have to apply some format mask either
SELECT
statement, within the TO_CHAR
function call), or Format mask you might consider is FM999G990D00
as
FM
will remove leading spaces and superfluous trailing zeros,
and .
grouping & decimal characters, use G
and D
insteadUpvotes: 1