Sponsored Content
Top Forums Shell Programming and Scripting Shell scripting unable to send the sql query data in table in body of email Post 302918874 by Sharanakumar on Friday 26th of September 2014 01:11:00 AM
Old 09-26-2014
Shell scripting unable to send the sql query data in table in body of email

I have written a shell script that calls below sql file. It is not sending the query data in table in the body of email.
Code:
spool table_update.html;
SELECT * FROM PROCESS_LOG_STATS where process = 'ActivateSubscription';
spool off;
exit;

Moderator's Comments:
Mod Comment Please use code tags next time for your code and data. Thanks

Last edited by vbe; 09-26-2014 at 05:54 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell to run query, encrypt and send email

Hello To do : 'automate the process of generating report and send it to client every 15 days after encrypting the report file' Did so far : - generate Java program to encrypt the file. - generate SQL query to run the report. Is there any body who can help me to go further ? ... (7 Replies)
Discussion started by: cub
7 Replies

2. Shell Programming and Scripting

How to use sql data file in unix csv file as input to an sql query from shell

Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies

3. Shell Programming and Scripting

We need a script that invokes the sql query every 14 days ans send email

Hi, We need a script that invokes the sql query every 14 days ans send email (0 Replies)
Discussion started by: bujjisveeru
0 Replies

4. Shell Programming and Scripting

We need a script that invokes the sql query every 14 days ans send email

HI, We need a script that invokes the sql query every 14 days ans send email (0 Replies)
Discussion started by: bujjisveeru
0 Replies

5. Shell Programming and Scripting

How to get full sql table data using shell script

i have a Oracle table like col1 col2 ---- ----- a 1 b 2 c 3 when i write a script for it , it gives me all the data in one column. Please give me the solution which gives the exact result like we see in sql editors. for a in `echo " set feedback off; set pagesize 40;... (1 Reply)
Discussion started by: ss135r
1 Replies

6. Shell Programming and Scripting

SQL query output convert to HTML & send as email body

Hi , I have a sql query in the unix script ,whose output is shown below.I want to convert this output to HTML table format & send email from unix with this table as email body. p_id src_system amount 1 A 100 2 B 200 3 C ... (3 Replies)
Discussion started by: jagadeeshn04
3 Replies

7. Shell Programming and Scripting

HTML table in email body using C Shell

I am using Sun Solaris ver. 5.10 and trying to send an HTML table in email body using mail command in C shell script. I tried following commands:- #1 mail -m "MIME-Version: 1.0;Content-type:text/html;charset=UTF-8" receiver@mail.com < file.html #2 mail -m "Content-type: text/html;" -s "This... (4 Replies)
Discussion started by: jnrohit2k
4 Replies

8. Shell Programming and Scripting

Regarding guidance related to HTML table in email body

Hello All, I have a query here. I am sending an HTML table(which I am creating it by a call to REST API, in a LINUX box) and from there I have to send it into an email. So following are the poins on same: As data is not static so it is writing Dynamic data and creating HTML file. There is... (9 Replies)
Discussion started by: RavinderSingh13
9 Replies

9. UNIX for Beginners Questions & Answers

Not able to generate table in email body

Below is the code snippet and I'm not able to generate the table in email, output email has nothing if ; then echo "File $fName exists." awk -F "," ' BEGIN { print "MIME-Version: 1.0" print "Content-Type: text/html" print "Subject: Out OF Network Fee - Portfolio Level Stats" print... (1 Reply)
Discussion started by: vyomdev
1 Replies

10. UNIX for Beginners Questions & Answers

Shell Script to read hive table and send email

HI Team, I am working on reading hive table and send email in email body using shell script, can you please help on fixing the errors: I have 6 columns in my hive table and trying to send the email in the mail body. below script: #!/bin/bash hive -e 'SELECT count(*) from db.table' >... (4 Replies)
Discussion started by: Mi4304
4 Replies
snprimedb,v0.3.8(8)					      System Manager's Manual					       snprimedb,v0.3.8(8)

NAME
snprimedb - feed the sn database. SYNOPSIS
snprimedb [-i] (no arguments) DESCRIPTION
snprimedb reads records from its standard input and enters them into the database. The database is appended to; if you want to start a new database, you would delete the database files .chain, .table, .newsgroup before running this program. The main purpose of snprimedb is to rebuild the ID database. Then its input is usually obtained from snscan. If the option -i is given, simply initialize the database files if they do not exist, and exit. Input lines are of the format newsgroup id serial where newsgroup is the newsgroup the article may be found in, id is its message id, and serial is the local serial num- ber of that article in that newsgroup. If newsgroup is the special name =junk, then the whole line is ignored. You will need to be root or the owner of /var/spool/sn to do this. BUGS
snprimedb does not check to see that the articles really exist. Also the size of the hash table is fixed at compile time. Under degenerate conditions, the hash table file .chain (see below) could grow very large, with reclaimed space remaining unused. This is due to the very simple file space allocator, which doesn't know how to coalesce adjacent free areas. It doesn't know how to split them either. The allocator assumes that the shape of the distribution of record lengths remains quite constant over time. The hash table database doesn't make any attempt to reduce its footprint. This should be acceptable, since the database is shared. ENVIRONMENT VARIABLES
SNROOT If this is set and is not empty, the value is used in place of /var/spool/sn, the default news spool directory. FILES
/var/spool/sn/.table snprimedb uses this file as the index of the hash table, and ... /var/spool/sn/.chain as the hash chains, and ... /var/spool/sn/.newsgroup to attach an integer identifier to each newsgroup name. This file is a human-readable flat text file. N.B. Harold Tay snprimedb,v0.3.8(8)
All times are GMT -4. The time now is 08:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy