0

Hi,
I am in need of writing a shell script to read, database table and email the results to a list of users.
Please let me know if I could provide further info.
Please assist.
Thanks,
-Abhey

2
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by abhey_1998
0

hi can you give us any code you have written so far and a few lines of the database and what needs to be in the email format etc

0

hi can you give us any code you have written so far and a few lines of the database and what needs to be in the email format etc

Hi, thanks for getting back to me.

To log into sql pls ( in the shell script. )
-- get the data.

$ORACLE_HOME/bin/sqlplus -s usr/pwd@database << EOF1 > msgbody
$LOGIN_PSWD
set feedback off
whenever sqlerror exit failure
EOF1

-- send email out.

cat msgbody | mailx -s "Subject:OnlyBody" someone@gmail.com

0

hi what format is the data in within the spreadsheet e.g

name dob address car reg

or

name
dob
address
car reg

etc

and what format do you want the data to be in the email??

0

Email would go to each sales rep
Subject line would be: commision paid
Body would be:
Commission paid for the following order
order no amt date
123 $2 2/2/08
345 $1 2/3/08 etc....
Please let me know if that helped.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.