Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Searching across multiple columns

RE: Searching across multiple columns

From: Mark Leith <mark_at_cool-tools.co.uk>
Date: Tue, 02 Oct 2001 03:45:07 -0700
Message-ID: <F001.0039E772.20011002040022@fatcity.com>

HELL of a reason to learn Perl!

Nice..

Mark

-----Original Message-----
Jared.Still_at_radisys.com
Sent: Monday, October 01, 2001 20:51
To: Multiple recipients of list ORACLE-L

<PerlEvangelism>

my $dbh = DBI->connect(

   'dbi:Oracle:' . $db,
   $username, $password,
   { RaiseError => 1, AutoCommit => 0 }
);

die "connect failed\n" unless $dbh;

my $sql='select * from persons;'
my $sth = dbh->prepare($sql) || die
my $rv = $sth->execute || die "error in execution\n";

while ( my $arrarRef = sth->fetchrow_arrayref ) {

   my @array = @{$arrayRef};
   if ( grep(/\s+hoser\s+/gi, @array ) ) {

      print "Hey! I found a hoser!\n";
   }
}

</PerlEvangelism>

This connected, built a cursor, read it and searched it.

Compare to how many lines of PL/SQL this would take.

Good reason to learn Perl? :)

Jared

                    rick_stephenso
                    n_at_ovid.com           To:     Multiple recipients of list
ORACLE-L <ORACLE-L_at_fatcity.com>
                    Sent by:             cc:
                    root_at_fatcity.c       Subject:     Searching across
multiple columns
                    om


                    10/01/01 11:55
                    AM
                    Please respond
                    to ORACLE-L






Does Oracle have a way to do a search across multiple columns/tables for specific data? I know I can issue a query with a bunch of or statements, but is there something similar to fulltext searching?

Thanks for the information,

Rick Stephenson

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: rick_stephenson_at_ovid.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark Leith
  INET: mark_at_cool-tools.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Oct 02 2001 - 05:45:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US