Hi Guys,
I'm new to this forum as well as to UNIX shell scripting.
I'm looking for a shellscript to query an Oracle database table and populate the result set of the query in a text file.
Could you someone help me out with a sample code?
Thanks,
Bhagat (7 Replies)
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 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)
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 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)
Hi Guys..
Need your help to format the output of my shell script.
I am using spool command to take out put in csv file.
below is my code. (for example)
col USERNAME for a15
col EMAIL for a30
col FULL_NAME for a20
col LAST_LOGIN for a40
col DATE_CREATED for a40
SPOOL 120.csv... (3 Replies)
Hi All,
I am fetching oracle query result in shell variable. As columns numbers are more the output wraps in unix terminal .i.e one complete record in db gets store in multiple lines. with each line ends with $ character. I want to remove these unnecessary $ character but to keep required $... (8 Replies)
Hi guys - I have a file and output like this below:
File: myfile.dat
File has content like this: ABCD, 34, 456, 2324
I would like excel to have this:
Name (ABCD) Quantity (34), Type (456), Status (2324)
(Name, Quantity, Type and Status are columns)
I would like to export... (4 Replies)
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Hi, I have a shell script which analyses the log folder for a specific string and throws me the output. I have used for loop since it does this in multiple servers. Now I want to save the output in a excel in the below format. Can someone please help?
The output which I get
Server1 : count... (1 Reply)
Discussion started by: srilaxman
1 Replies
LEARN ABOUT DEBIAN
spreadsheet::parseexcel::simple
Spreadsheet::ParseExcel::Simple(3pm) User Contributed Perl Documentation Spreadsheet::ParseExcel::Simple(3pm)NAME
Spreadsheet::ParseExcel::Simple - A simple interface to Excel data
SYNOPSIS
my $xls = Spreadsheet::ParseExcel::Simple->read('spreadsheet.xls');
foreach my $sheet ($xls->sheets) {
while ($sheet->has_data) {
my @data = $sheet->next_row;
}
}
DESCRIPTION
This provides an abstraction to the Spreadsheet::ParseExcel module for simple reading of values.
You simply loop over the sheets, and fetch rows to arrays.
For anything more complex, you probably want to use Spreadsheet::ParseExcel directly.
BOOK METHODS
read
my $xls = Spreadsheet::ParseExcel::Simple->read('spreadsheet.xls');
This opens the spreadsheet specified for you. Returns undef if we cannot read the book.
sheets
@sheets = $xls->sheets;
Each spreadsheet can contain one or more worksheets. This fetches them all back. You can then iterate over them, or jump straight to the
one you wish to play with.
book
my $book = $xls->book;
The Spreadsheet::ParseExcel object we are working with. You can use this if you need to manipulate it in ways that this interface doesn't
allow.
SHEET METHODS
These methods can be called on each sheet returned from $xls->sheets:
has_data
if ($sheet->has_data) { ... }
This lets us know if there are more rows in this sheet that we haven't read yet. This allows us to differentiate between an empty row, and
the end of the sheet.
next_row
my @data = $sheet->next_row;
Fetch the next row of data back.
sheet
my $obj = $sheet->sheet;
The underlying Spreadsheet::ParseExcel object for the worksheet. You can use this if you need to manipulate it in ways that this interface
doesn't allow (e.g. asking it for the sheet's name).
AUTHOR
Tony Bowden
BUGS and QUERIES
Please direct all correspondence regarding this module to:
bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org
COPYRIGHT AND LICENSE
Copyright (C) 2001-2005 Tony Bowden.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License; either version 2 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
SEE ALSO
Spreadsheet::ParseExcel.
perl v5.8.8 2008-03-12 Spreadsheet::ParseExcel::Simple(3pm)