Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Pattern maching question
Hi, I think you can try this:
select contact_name from contact
where substr(contact_name,1,1) in
('0','1','2','3','4','5','6','7','8','9');
inna
--- Glenn Travis <Glenn.Travis_at_wcom.com> wrote:
> How can I get all the contacts which start with
> numbers?
> PLEASE NOTE: contact_name is a character field.
>
> select contact_name from contact
> where contact_name like '[0-9]%'
>
> does not work (like other dbms...)
>
> My workaround is;
>
> select contact_name from contact
> where contact_name < 'A'
>
> but I want to know the proper syntax for the first
> query.
> --
> Author: Glenn Travis
> INET: Glenn.Travis_at_wcom.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
![]() |
![]() |