Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: a kinder gentler LIKE
Hi,
try something like
select * from table_name where column_name between '0' and
RPAD('9',30,CHR(255)).
The second argument in RPAD ("30") is be the maximal length of your column.
The third parameter (CHR(x)) is the last character in your character set.
This way, an Index on your column might be used.
Ulrich
pretzelman schrieb:
> Hello,
>
> Does anyone know how Oracle allows you to specify a pattern such as
> this:
> LIKE '[0-9]%'
> I am trying to get all values which begin with a numeric digit, followed
> by any number of characters of anything else. Oracle doesn't like this;
> IE it doesn't give me the rows I know are there. Thanks.
>
> Paul
Received on Fri Aug 04 2000 - 00:00:00 CDT
![]() |
![]() |