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: <Jared.Still_at_radisys.com>
Date: Mon, 01 Oct 2001 11:42:47 -0700
Message-ID: <F001.0039DC3F.20011001115039@fatcity.com>

<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).
Received on Mon Oct 01 2001 - 13:42:47 CDT

Original text of this message

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