I am doing a query
, where the results it returns are very large numbers and it is difficult to read the amount if there are no dots to separate the units of the numbers, I would like to know if there is the possibility of doing this in SQL
.
This is the query
one I have:
select
banco as BANCO,
sum(TDA) as ACTIVOS,
sum(CV+CR+CVNCD+CEL) as CARTERA,
sum(ITV) as ITV,
sum(CDP) as CAPTACIONES,
sum(TDP) as PASIVOS,
sum(TPT) as PATRIMONIO,
sum(BOIFP+BCE+ITV+CV+CR) as ACTIVOS_R
from RR001
where fecha between to_date('2017/12/01','YYYY/MM/DD') and to_date('2018/01/01','YYYY/MM/DD')
group by banco
The results it gives me are the following:
I would like to know if it is possible in some way that the results come out as follows, for example:
1.718.062,82
459.316,79
And if it is possible to do it, how would it be?, thanks in advance.
To format something as currency, you can use
Which in this example would show
$10,000.00
. Just replace the first parameter of TO_CHAR with the column whose data you want to format and it should work.