This code:
create table your_table(day date, tot_dls number(5));
insert into your_table values ('01-SEP-2012',10000);
insert into your_table values ('02-SEP-2012',9920);
insert into your_table values ('03-SEP-2012',12020);
insert into your_table values ('04-SEP-2012',11030);
column dummy noprint
column "Header" format a7
column "Data" format a60
set hea off
SELECT 0 DUMMY
,'Day' "Header"
,LISTAGG(' ' || TO_CHAR(Day,'DD-MON-YYYY')) WITHIN GROUP (ORDER BY Day) "Data"
FROM your_table
UNION
SELECT 1
,'Tot_dls'
,LISTAGG(LPAD(TOT_DLS,13-LENGTH(TO_CHAR(TOT_DLS,'FM')),' ')) WITHIN GROUP (Order by Day)
FROM your_table
ORDER by 1;
produces this output using SQL*Plus on an Oracle 11g (11.2.0) database.
Day 01-SEP-2012 02-SEP-2012 03-SEP-2012 04-SEP-2012
Tot_dls 10000 9920 12020 11030