note : you can do it a bit simpler than what you used Pando :

Code:
#!/bin/ksh

fec=$(sqlplus -s loop/loop@loop << EOF
set pagesize 0
set feed off
set serveroutput on
select sysdate
from dual;
EOF)

echo $fec