Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simply question about TO_NUMBER function
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