Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s pqr/Hello123 << EOF
spool on
set linesize 60
spool $FILE_PATH/CC_successful.csv
set head off
set pagesize 9999
select ename,eid,edate from emp where trunc(edate) = trunc(to_Date(sysdate))
EXIT
EOF
print "CC successful Orders" > $FILE_PATH/Dash.csv
cat $FILE_PATH/CC_successful.csv >> $FILE_PATH/Dash.csv
print "*************************" >> $FILE_PATH/Dash.csv
cd $FILE_PATH/
uuencode Dash.csv Dash.csv| mail -s "Dash for `date +%C%y%m%d` "
pnareshnaidu@gmail.com"
Can some one please suggest me where i need to make changes in the above script