https://randomsrsolutions.blogspot.com/2018/05/using-tochar-function-with-numbers.html
select
to_char(58,'99.9') A,
to_char(58,'00.0') B,
to_char(58,'$99.9') C,
to_char(58,'$00.0') D
from dual;
A B C D
58.0 58.0 $58.0 $58.0
select to_char(58,'999.99') A,
to_char(58,'000.00') B,
to_char(58,'$999.99') C,
to_char(58,'$000.00') D
from dual;
A B C D
58.00 058.00 $58.00 $058.00
select to_char(58,'99,999.99') A,
to_char(58,'00,000.00') B,
to_char(58,'$99,999.99') C,
to_char(58,'$00,000.00') D
from dual;
A B C D
58.00 00,058.00 $58.00 $00,058.00
select to_char(58755,'99,999.99') A,
to_char(58755,'00,000.00') B,
to_char(58755,'$99,999.99') C,
to_char(58755,'$00,000.00') D
from dual;
A B C D
58,755.00 58,755.00 $58,755.00 $58,755.00
select to_char(5858755,'99,999.99') A,
to_char(5858755,'00,000.00') B,
to_char(5858755,'$99,999.99') C,
to_char(5858755,'$00,000.00') D
from dual;
A B C D
########## ########## ########### ###########
select EMPNO, ENAME, HIREDATE, TO_CHAR(HIREDATE, 'DD DDSP') "DATE",
to_char(HIREDATE, 'MON-RRRR') MON_YEAR,
to_char(HIREDATE, 'RRRR') YEAR,
TO_CHAR(SAL, '99,999.99') SALARY
from EMP
where ENAME = 'KING';
EMPNO ENAME HIREDATE DATE MON_YEAR YEAR SALARY
7839 KING 17-NOV-81 17 SEVENTEEN NOV-1981 1981 5000.00
Subscribe to:
Post Comments (Atom)
XLA to GL Link
https://plsqlquery.blogspot.com/2025/12/xla-to-gl-link.html SELECT acr.cash_receipt_id, acr.receipt_number, ...
-
https://plsqlquery.blogspot.com/2018/05/using-outer-joins-in-plsql-query.html We use Outer Join when mismatched Values to be displayed ...
-
https://plsqlquery.blogspot.com/2018/05/using-trim-in-plsql-query.html The Oracle/PLSQL TRIM function removes all specified characters eit...
-
https://randomsrsolutions.blogspot.com/2018/05/using-trunc-function-with-numbers-in.html The TRUNC function Truncates the Column, Expressi...
No comments:
Post a Comment