I have a SQL script that I am running in a shell. The problem is I am unable to get rid of the SQL in the spool file.
SQL file :
set termout off
set echo off
set pagesize 0
set linesize 18
set heading off
set feedback off
set tab off
set space 0
set verify off
set timing off
spool abc.dat
select
RPAD(abc,10,' '),
LPAD(ssss,4,'0'),
LPAD(xxx,4,'0')
from whtevertable where rownum < 10;
spool off
exit
EOF
abc.ksh
#!/bin/ksh
sqlplus /
@datafile.sql
Am I calling the SQL script correctly?