It worked fine. but how to put the sql output into the xls file.
Now How do i send it to excel sheet.
I have done some part but dont know how to append the sql output
FILENAME: DISNEY09212013.xls
Header Row:
<html><body><table border='1'><caption>DISNEY BOOKING<br/>Delivery Date: ${TDATE_SLASH}</caption><tr><th colspan="13" bgcolor="black"></th></tr><tr bgcolor='#D3D3D3'><th>BOOKING</th><th>ARRIVAL DATE</th><th>STATUS</th><th>LAST_NAME</th><th>FIRST_NAME</th></tr>" >${DISNEY_REPORT_HOME}/${DISNEY_FILE}
+ echo '<html><body><table border='\''1'\''><caption>DISNEY BOOKING<br/>Delivery Date: 09/21/2013</caption><tr><th colspan=13 bgcolor=black></th></tr><tr bgcolor='\''#D3D3D3'\''><th>BOOKING</th><th>ARRIVAL DATE</th><th>STATUS</th><th>LAST_NAME</th><th>FIRST_NAME</th></tr>
Then The SQL QUERY
sqlplus -S /nolog << EOF >> DISNEY09212013.xls
connect tipls/tipls@plsdev
set echo off feedback off linesize 4000 pagesize 0 sqlprompt '' trimspool on
select res.ti_book_no ,res.arrival_date ,res.ti_status,res.last_name,res.first_name from disney_ticket_history res where res.ti_status ='PENDING' and res.request_file_id IN (select req.request_file_id from disney_ticket_request_file req where transaction_date=${TRANSACTION_DATE});
EOF
</table></body></html>" >>DISNEY09212013.xls
Desired Output on file DISNEY09212013.xls(Its not compulsory xls file it can be any file where the output can be easily written:
########################
DISNEY BOOKING
Delivery Date: 09/21/2013
BOOKING ARRIVAL DATE STATUS LAST_NAME FIRST_NAME
X 09222013 PENDING ABC XYZ
A 10122013 PENDING KLM EFG
#######################
---------- Post updated 09-26-13 at 01:56 PM ---------- Previous update was 09-25-13 at 11:25 PM ----------
Hi,
I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers.
Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
if
then
# mail -s "Import failed file does not exist" sanjay.jaiswal@xyz.com
echo "FILE does not exist"
exit 1
fi
echo "FILE EXIST"
size=-1
set $(du /export/home/oracle/nas/scott21.dmp.gz)
while
do
echo "Inside the loop"
size=$1
set $(du... (1 Reply)
Can someone tell me why I'm getting error when I try to run this?
#!/bin/csh -f
source ~/.cshrc
#
set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus
#
set count=`$SQLPLUS -s ${DB_LOGIN} << END
select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
So, I would like to run differen select queries on multiple databases..
I made a script wich I thought to be called something like..
./script.sh sql_file_name out.log
or to enter select statement in a command line..
(aix)
and I did created some shell script wich is not working..
it... (6 Replies)
Hello everyone,
I have a RHEL 5 system and have been trying to get a batch of 3-4 scripts each in a separate variables and they are not working as expected.
I tried using following syntax which I saw a lot of people on this site use and should really work, though for some reason it doesn't... (3 Replies)
I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this?
Is there a way to have a persistent connection to oracle database... (9 Replies)
HI,
I want to connect to database and fetch the count from a table.
The sql query is as below :
select count(*) from table_test where test_column='read';
How can I print the output of this statement using shell script.
Thanks in advance. (4 Replies)
Using ksh, I am using SQLPlus to execute a query with a filter using a string variable.
REPO_DB=DEV1
FOLDER_NM='U_nmalencia'
FOLDER_CHECK=$(sqlplus -s /nolog <<EOF
CONNECT user/pswd_select@${REPO_DB}
set echo off heading off feedback off
select subj_name
from subject
where... (5 Replies)
Hi Team,
I am trying to run a sqlplus script against several databases via a FOR/LOOP and also passing the loop variable to a sqlplus script I am calling, as follows:
#!/bin/bash
export ORACLE_SID=plgc1
export ORACLE_HOME=/opt/oracle/product/11.2.0.2/db_1
export... (1 Reply)
Discussion started by: jonnyd
1 Replies
LEARN ABOUT DEBIAN
uri::fetch::response
URI::Fetch::Response(3pm) User Contributed Perl Documentation URI::Fetch::Response(3pm)NAME
URI::Fetch::Response - Feed response for URI::Fetch
SYNOPSIS
use URI::Fetch;
my $res = URI::Fetch->fetch('http://example.com/atom.xml')
or die URI::Fetch->errstr;
print $res->content;
DESCRIPTION
URI::Fetch::Response encapsulates the response from fetching a feed using URI::Fetch.
USAGE
$res->content
The contents of the feed.
$res->uri
The URI of the feed. If the feed was moved, this reflects the new URI; otherwise, it will match the URI that you passed to fetch.
$res->etag
The ETag that was returned in the response, if any.
$res->last_modified
The Last-Modified date (in seconds since the epoch) that was returned in the response, if any.
$res->status
The status of the response, which will match one of the following enumerations:
o URI::Fetch::URI_OK()
o URI::Fetch::URI_MOVED_PERMANENTLY()
o URI::Fetch::URI_GONE()
o URI::Fetch::URI_NOT_MODIFIED()
$res->http_status
The HTTP status code from the response.
$res->http_response
The HTTP::Response object returned from the fetch.
$res->is_success
$res->is_redirect
$res->is_error
Wrappers around the "$res->response" methods of the same name, for convenience.
$res->content_type
The Content-Type header from the response.
AUTHOR & COPYRIGHT
Please see the URI::Fetch manpage for author, copyright, and license information.
perl v5.12.4 2011-08-29 URI::Fetch::Response(3pm)