thanx a lot 
 
i checked it is working

--- On Sun, 24/5/09, Nadeem M. Khan <[email protected]> wrote:


From: Nadeem M. Khan <[email protected]>
Subject: Re: [LinuxVadaPav] How to redirect oracle sql query output to a text 
file
To: [email protected]
Date: Sunday, 24 May, 2009, 1:58 PM








On Fri, May 22, 2009 at 10:50 AM, ashok abraham <ashok...@yahoo. com> 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.
















      Bollywood news, movie reviews, film trailers and more! Go to 
http://in.movies.yahoo.com/

[Non-text portions of this message have been removed]

Reply via email to