Hi All ,
I have requirement , following shell script and sql are using. Need your help to get sql query with result o/p in spooling fiie.
shell script
Generate_sql ()
{
sqlplus -s <<-EOF
${PBDW_USERID}/${PBDW_PWD}@${PBDW_SID}
@temp.sql
EOF
}
temp.sql file
set echo on;
spool temp.log
select EMP_NAME from emp;
spool off;
O/P
A
B
C
Required o/p
select EMP_NAME from emp;
EMP_NAME
A
B
C
Need you help to get spool file with query and results set.