Hi All
This may not be entirely Unix related but I'll just have to try my luck and see if you know how to do this:
I need to spool the results of my SQL query into a file but as there are too many fields in the query the resultant spool file put the last few fields on the next line.
May I... (2 Replies)
hi,
can anyone help me by saying how can i spool a unix file.. do we need to specify the pathname as such to spool the file ..
right now, i tried giving like spool filename in the sql prompt.. but its not giving me the required output even if i can see that the command is being executed..
... (2 Replies)
Hi,
I am trying to do this
For i in *.txt
do
sed 'some pattern checking' $i
done
>file
These text files are spool files.And when i find error in these spool files I want to append the text file contents to error.log file.
Or is there any option that I do this sed for only files that... (12 Replies)
HI
Have some problem with spooling out some relatively large number of records (~2-3 mil)
Small table - OK though.
Getting error: SP2 0308: cannot close spool file.
Any thoughts?
sqlplus -s user/pwd << EOF
set term off
set head off
set trims on
set pages 0
set... (1 Reply)
Dear Gurus,
Tried searching for some clues in this forum but dont seem to be able to find my answer. :confused:
Anyway i have a quick question:
Today I have produced a messages generated from a application and placed them on the print queue. Before this I had stopped the printer queue, so... (2 Replies)
hi all,
am trying to write a ksh script which will take a username, password, db instance as input arguments and login to the database using sqlplus and select some data via sql and spool to a file.
problem is that i am using "sqlplus -s" in order to hide the username/password and it doesnt... (8 Replies)
Hi
I am logging into sql using script.
sqlplus ima/ima@test <<!
spool /opt/tt/spoolfile.txt
@sql.sql
spool off.
now i am getting a spool file named spoolfile.txt.lst
i want it to be only spoolfile.txt
I am working on solaris
Please help (6 Replies)
Hello,
I am trying to spool data from database into a file on solaris through ksh.
Data is getting fetched but the problem is record is getting split in to multiple lines.
excerpt from sql is
whenever sqlerror exit 1;
set define on
set echo off
set feed off
set head off
set... (1 Reply)
Hi,
I have a requirement of
Connecting to sqlplus from unix
Execute the package. The output of package is stored in a table
Need to query the table and move to txt file.
The problem iam facing is, when I try to spool the file. I get the sql query also along with the output.... (6 Replies)
Hello,
I have a shell script through which I am executing .sql file and spooling the result of Query from .sql . I want to spool the result in ascending order. Is there any parameter to be set to print result in ascending or descending order.
Thanks in advance. (4 Replies)
Discussion started by: Aparna.N
4 Replies
LEARN ABOUT DEBIAN
class::dbi::abstractsearch
Class::DBI::AbstractSearch(3pm) User Contributed Perl Documentation Class::DBI::AbstractSearch(3pm)NAME
Class::DBI::AbstractSearch - Abstract Class::DBI's SQL with SQL::Abstract::Limit
SYNOPSIS
package CD::Music;
use Class::DBI::AbstractSearch;
package main;
my @music = CD::Music->search_where(
artist => [ 'Ozzy', 'Kelly' ],
status => { '!=', 'outdated' },
);
my @misc = CD::Music->search_where(
{ artist => [ 'Ozzy', 'Kelly' ],
status => { '!=', 'outdated' } },
{ order_by => "reldate DESC",
limit_dialect => 'LimitOffset',
limit => 1
offset => 2 });
DESCRIPTION
Class::DBI::AbstractSearch is a Class::DBI plugin to glue SQL::Abstract::Limit into Class::DBI.
METHODS
Using this module adds following methods into your data class.
search_where
$class->search_where(%where);
Takes a hash to specify WHERE clause. See SQL::Abstract for hash options.
$class->search_where(\%where,\%attrs);
Takes hash reference to specify WHERE clause. See SQL::Abstract for hash options. Takes a hash reference to specify additional query
attributes. Class::DBI::AbstractSearch uses these attributes:
o order_by
Array reference of fields that will be used to order the results of your query.
o limit_dialect
Scalar, DBI handle, object class, etc. that describes the syntax model for a LIMIT/OFFSET SQL clause. Please see
SQL::Abstract::Limit for more information.
o limit
Scalar value that will be used for LIMIT argument in a query.
o offset
Scalar value that will be used for OFFSET argument in a query.
Any other attributes are passed to the SQL::Abstract::Limit constructor, and can be used to control how queries are created. For
example, to use 'AND' instead of 'OR' by default, use:
$class->search_where(\%where, { logic => 'AND' });
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net> with some help from cdbi-talk mailing list, especially:
Tim Bunce
Simon Wilcox
Tony Bowden
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Class::DBI, SQL::Abstract, SQL::Abstract::Limit
perl v5.10.0 2009-07-21 Class::DBI::AbstractSearch(3pm)