|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Take Data From a table and send it through mail
Hi can anyone help me in writing a code for taking data from a table and need to send that data through mail using mail -x command..
|
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Table you mean from Data Base ? If so , is it from which DB?
I am assuming that the table exists in Oracle, you can do: (1) Connect to oracle DB, using sqlplus -s "user_name/passwd"@oracle_sid << write your query here to get the data (2) store the step(1) output into a file (3) mail the file using mail -x from the file obtained in step 2)Regards, |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks
How to store the output into a file .I am using oracle DB I need to select 9 columns ---------- Post updated at 08:07 AM ---------- Previous update was at 06:22 AM ---------- Thanks How to store the output into a file .I am using oracle DB I need to select 9 columns |
|
#4
|
||||
|
||||
|
SQL*Plus command
SPOOL can be used to store query result in file. Syntax: Code:
SPOOL filename --your query here SPOOL OFF Note: Search the internet and you will find many examples of spooling along with how to format query results. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Represent the data in table format as in mail content | navsan | Shell Programming and Scripting | 8 | 03-15-2013 04:38 PM |
| Mailx command - send mail as table format | qwertyu | Shell Programming and Scripting | 2 | 11-29-2012 11:37 AM |
| Send mail through shell script with HTML table. | Kinshuk Saxena | Shell Programming and Scripting | 2 | 09-15-2012 02:51 PM |
| How to send html file in a mail not as an attachment but it should display in the mail in table for | mani_isha | UNIX for Dummies Questions & Answers | 0 | 03-30-2010 03:37 AM |
| Arrange Data in table and send by mail | xjklop2009 | Shell Programming and Scripting | 4 | 11-28-2009 01:50 PM |
|
|