Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Wildcard Problem

Re: Wildcard Problem

From: sonofbr <sonofbr_at_gmail.com>
Date: 18 Oct 2006 14:21:13 -0700
Message-ID: <1161206473.626956.304710@f16g2000cwb.googlegroups.com>

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

Original text of this message

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