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

Home -> Community -> Usenet -> c.d.o.server -> Re: Search for a word in all columns in all rows

Re: Search for a word in all columns in all rows

From: Noel <tbal_at_go2.pl>
Date: Fri, 23 Jan 2004 14:27:06 -0000
Message-ID: <bur796$g3h$1@inews.gazeta.pl>

Uzytkownik "Dil Jaey" <diljaey_at_comcast.net>
> I am allowing users to enter in a keyword search via a web interface
> and in the backend Oracle 9i is requested to search for that keyword
> in all columns (30) for every row (thousands) that exists within a
> given table(s).
>
> Is this a relatively simple task to perform or is this a path that
> should not be traveled.

SELECT 1
   FROM 30_column_table
 WHERE col1||col2||.....||col30 like '%find_this_stuff%'

... if length of that concatenate doesn't exeed 2000 or 4000 bytes... it could be done with one FTS, and long a few seconds with tousands of rows.

--
Noel
Received on Fri Jan 23 2004 - 08:27:06 CST

Original text of this message

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