Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Wildcard Problem
harry_johnson_4_you_at_yahoo.com wrote:
> I am trying to write a simple query to pull data from a database where
> a column has data that starts with a 4 and is only 2 characters long.
>
> I thought the query would be:
>
> Select * from myDB where column1 like '4_'
I would do it with:
select *
from mydb
where length(column1) = 2
and substr(column1,1,1) = '4'
this might be the hard way but it should work. Received on Wed Oct 18 2006 - 16:21:13 CDT
![]() |
![]() |