Hi Pal,
I have the following query which needs the formating on the third column
in the query
SELECT DISTINCT
INITCAP(SUBSTR
(TB_TRL001_PLDETAILS.PL_DSC,7,LENGTH(TB_TRL001_PLDETAILS.PL_DSC))) "P L",
to_number(to_char(TB_TRL001_PLDETAILS.PL_TRL_MTD_AMT,'999,999,999,999'),'999
,999,999,999') "MTD",
to_number(to_char(TB_TRL001_PLDETAILS.PL_TRL_QTD_AMT,'999,999,999,999'),'999
,999,999,999') "QTD",
to_number(to_char(TB_TRL001_PLDETAILS.PL_TRL_YTD_AMT,'999,999,999,999'),'999
,999,999,999') "YTD",
to_number(to_char(TB_TRL001_PLDETAILS.PL_TRL_PYTD_AMT,'999,999,999,999'),'99
9,999,999,999') "PYTD"
FROM TB_TRL001_PLDETAILS
WHERE TB_TRL001_PLDETAILS.PERIOD_NUM = TO_NUMBER(TO_CHAR(SYSDATE,'MM'))-1
order by 3 desc
/
I want the output to be 12,234,345 format( with comma)...
can anybody has idea how to to this in the single query? there are negative
and positive values in the query....
Thanks
Ramesh
"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system."
Oracle LazyDBA home page