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: Simply question about TO_NUMBER function

Re: Simply question about TO_NUMBER function

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: 3 Feb 2005 11:08:40 -0800
Message-ID: <1107457720.224796.107760@z14g2000cwz.googlegroups.com>

MariMax wrote:
> "Tom Dyess" <tdyess_at_dysr.com> ha scritto nel messaggio
> news:u1fMd.23624$t67.10929_at_bignews5.bellsouth.net...
> >
> > SELECT * FROM Table1 WHERE Field1 = TO_CHAR(456)
> >
>
> It don't work because if i have values '456' and '0456' and '00456',
i want
> the query return three records not only the first.
> I can't define the field NUMERIC because it may be alphanumeric.

BUT
456 <> 0456 <> 00456
either numerically (normally 0456 means an octal number and 00456 is something weird) OR alphanumerically

so WHAT is your real search creiteria?

If numeric then use a number column. If alphanumeric then look up the LIKE operator, OR clean up your data!

 ed Received on Thu Feb 03 2005 - 13:08:40 CST

Original text of this message

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