Do you have a better way to format value with space after the symbol of the coin?

Asked

Viewed 244 times

0

Good morning !

I have a need to format the value with a space after the symbol of the coin in Oracle, I managed using the form below:

select to_char('0','L')||' '||ltrim(to_char('1235675430,12','999G999G999G999G999G990D99') ) from dual;

There’s a better way to do it, instead of doing it the way I did it ?

1 answer

0

I did it as follows, using the FM to clear the spaces:

SELECT 'R$ '||to_char('1235675430,12','FM999G999G999G999D99') FROM DUAL;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.