I tried the below sql script to extract the table columns into excel file. I could see the file generated but its a emp file.. no data extracted.
Am I missing anything here? I am running this script from my local PC using sqlplus.exe
Please help !
query.sql:-
set termout off
set hea off
set pagesize 0
spool lecturer_output.csv
select '"'||Col1||'","'||Col2||'","'||Col3||'","'||Col4||'","'||Col5||'","'||Col6||'","'||Col7||'",'||Col8||',"'||Col9||'","'||Col10||'","'||Col11||'","'||Col12||'",'||Col13||','||Col14||','||Col15 from Tablename
spool off
Tablename:-
Col1 VARCHAR2(10 CHAR),
Col2 VARCHAR2(10 CHAR),
Col3 VARCHAR2(80 CHAR),
Col4 VARCHAR2(10 CHAR),
Col5 VARCHAR2(10 CHAR),
Col6 VARCHAR2(10 CHAR),
Col7 VARCHAR2(20 CHAR),
Col8 NUMBER,
Col9 VARCHAR2(10 CHAR),
Col10 VARCHAR2(20 CHAR),
Col11 VARCHAR2(10 CHAR),
Col12 VARCHAR2(10 CHAR),
Col13 NUMBER,
Col14 NUMBER,
Col15 NUMBER