Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Searching across multiple columns
I'm sure Perl would be more efficient especially as you don't have to name the columns, but if you don't have to worry about the combined columns being too large isn't it equivalent to
select col1||'|'||col2 etc
from table
having col1||'|'||col2 etc like '%value%'
Iain Nicoll
-----Original Message-----
Sent: 02 October 2001 13:00
To: Multiple recipients of list ORACLE-L
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 ListsReceived on Tue Oct 02 2001 - 07:18:37 CDT
--------------------------------------------------------------------
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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Nicoll, Iain (Calanais) INET: iain.nicoll_at_calanais.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).
![]() |
![]() |