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: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: 2000/08/09
Message-ID: <39913EE2.2291@yahoo.com>#1/1

Franck HUGOT wrote:
>
> 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

You could use dynamic sql to get the column from user_tab_columns and then execute that...Not great but possible...

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Wed Aug 09 2000 - 00:00:00 CDT

Original text of this message

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