I have a query (shown below) that I use to produce a CSV file. Now, the first 2 columns need to be enclosed in ".
The query:
select BUDGETCENTER ||','||ACCOUNTNUMBER ||','||TOTALAMOUNT
from
(select c.bu_type BUDGETCENTER,
a.account_number ACCOUNTNUMBER,
sum(a.converted_amount) TOTALAMOUNT
from table a,
table b,
table c,
table d
where a.tran_id = b.tran_id
and a.bu_set_id = c.bu_set_id(+)
and a.tran_detail_id = d.tran_detail_id(+)
group by c.bu_type, c.bu_code, a.account_number
order by 1)
The output currently looks like this:
76000 ,FICA-ER ,2675.24
76000 ,FUI-ER ,145.44
76000 ,OVERTIME ,137.81
How can I make it look like this:
"76000" ,"FICA-ER" ,2675.24
"76000" ,"FUI-ER" ,145.44
"76000" ,"OVERTIME" ,137.81
I tried the q' delimiter but that does not seem to work in this case.
Please help !
Thanks.
The query:
select BUDGETCENTER ||','||ACCOUNTNUMBER ||','||TOTALAMOUNT
from
(select c.bu_type BUDGETCENTER,
a.account_number ACCOUNTNUMBER,
sum(a.converted_amount) TOTALAMOUNT
from table a,
table b,
table c,
table d
where a.tran_id = b.tran_id
and a.bu_set_id = c.bu_set_id(+)
and a.tran_detail_id = d.tran_detail_id(+)
group by c.bu_type, c.bu_code, a.account_number
order by 1)
The output currently looks like this:
76000 ,FICA-ER ,2675.24
76000 ,FUI-ER ,145.44
76000 ,OVERTIME ,137.81
How can I make it look like this:
"76000" ,"FICA-ER" ,2675.24
"76000" ,"FUI-ER" ,145.44
"76000" ,"OVERTIME" ,137.81
I tried the q' delimiter but that does not seem to work in this case.
Please help !
Thanks.