ebrian,
Thanks for your reply.I did n't get it.
I am creating csv file to automatically format into excel.pl see bellow the sql query. the query wroks fine.
i got the result. But in excel it shows each select count value
775 888 999 234 546 in one excel cell.
In order to separate each count result in each separate cell in excel.
i need extra comma(,) after each count to automatically format in excel.

How do add extra comma in this sql query after each select statement.
select
(select count(name)
from emp,dept
where emp_id = dept_id
and emp_type = 'FINS'
and emp_TimeStamp2 >= TO_DATE('&startdate1# 00:00:01','YYYY-MM-DD HH24:MI:SS')
and emp_TimeStamp3 <= TO_DATE('&enddate1# 23:59:59','YYYY-MM-DD HH24:MI:SS')) as a,
(select count(name)
from ah,oh
where ah_oh_idnr = oh_idnr
and emp_type = 'FINS'
and emp_TimeStamp2 >= TO_DATE('&startdate2# 00:00:01','YYYY-MM-DD HH24:MI:SS')
and emp_TimeStamp3 <= TO_DATE('&enddate2# 23:59:59','YYYY-MM-DD HH24:MI:SS')) as b,
(select count(name)
from ah,oh
where ah_oh_idnr = oh_idnr
and emp_type = 'FINS'
and emp_TimeStamp2 >= TO_DATE('&startdate3# 00:00:01','YYYY-MM-DD HH24:MI:SS')
and emp_TimeStamp3 <= TO_DATE('&enddate3# 23:59:59','YYYY-MM-DD HH24:MI:SS')) as c,
(select count(name)
from ah,oh
where ah_oh_idnr = oh_idnr
and emp_type = 'FINS'
and emp_TimeStamp2 >= TO_DATE('&startdate4# 00:00:01','YYYY-MM-DD HH24:MI:SS')
and emp_TimeStamp3 <= TO_DATE('&enddate4# 23:59:59','YYYY-MM-DD HH24:MI:SS')) as d,
(select count(name)
from ah,oh
where ah_oh_idnr = oh_idnr
and emp_type = 'FINS'
and emp_TimeStamp2 >= TO_DATE('&startdate5# 00:00:01','YYYY-MM-DD HH24:MI:SS')
and emp_TimeStamp3 <= TO_DATE('&enddate5# 23:59:59','YYYY-MM-DD HH24:MI:SS')) as e,
(select count(name)
from ah,oh
where ah_oh_idnr = oh_idnr
and emp_type = 'FINS'
and emp_TimeStamp2 >= TO_DATE('&startdate6# 00:00:01','YYYY-MM-DD HH24:MI:SS')
and emp_TimeStamp3 <= TO_DATE('&enddate6# 23:59:59','YYYY-MM-DD HH24:MI:SS')) as f,
(select count(name)
from ah,oh
where ah_oh_idnr = oh_idnr
and emp_type = 'FINS'
and emp_TimeStamp2 >= TO_DATE('&startdate7# 00:00:01','YYYY-MM-DD HH24:MI:SS')
and emp_TimeStamp3 <= TO_DATE('&enddate7# 23:59:59','YYYY-MM-DD HH24:MI:SS')) as g,
from dual;
SPOOL OFF
EndOfCat