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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Complex search for a String

Re: Complex search for a String

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: 2000/08/10
Message-ID: <8mtq60$q30$1@soap.pipex.net>#1/1

We have an in-house piece of java that does just this. The approach is to select the table names from dba_tables and then the columns within that are of type varchar2, or char and long enough to contain the string (from dba_tab_columns. The program then returns columns where select string from table_name where column_name like '%string%'. This approach does work but is obviously slow.

I can let you have the code if necessary, but it does take a while. email me privately if this is the case.
"Franck HUGOT" <fhugot_at_globalimmo.org> wrote in message news:8mr02e$jo$1_at_reader1.imaginet.fr...
> Ok thanks but is there a way not to specify columns?
>
>
> Connor McDonald <connor_mcdonald_at_yahoo.com> a écrit dans le message :
> 398FFCF8.4828_at_yahoo.com...
> > Franck HUGOT wrote:
> > >
> > > Hello,
> > >
> > > I would like to search a String in all columns of a table.
> > > I know I can do :
> > > select user_name from usertable where user_prenom='smith' or
> > > user_ville='smith' or user_alias='smith' or ....
> > >
> > > Is there a more simple way?
> > >
> > > Thanks in advance.
> >
> > where instr(col1||col2||col3||... , 'string') > 0
> >
> > HTH
> > --
> > ===========================================
> > Connor McDonald
> > http://www.oracledba.co.uk
> >
> > We are born naked, wet and hungry...then things get worse
>
>
Received on Thu Aug 10 2000 - 00:00:00 CDT

Original text of this message

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