On Fri, May 22, 2009 at 10:50 AM, ashok abraham <[email protected]> wrote: > > > My sql script is as follows > > iam callling the sql query from my email creation script > > sqlplus -s SB/s...@spcl <<EOF > select employee_name,last_name from employee_master where > employee_id = $erpno ; > EXIT; > EOF; > exit >
Try this in your email creation script: #!/bin/bash .......... .......... ......... echo " set heading off verify off feedback off pagesize 0 select employee_name,last_name from employee_master where employee_id = $erpno ; exit " | sqlplus -s username/passwd | while read firstname lastname do echo $firstname $lastname done ........... ........... ......... This will give yo uthe fisrtname and lastname values in your script. You can then use them for email creation by replacing echo with your email commands. Regards, NMK.
