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: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 18 Oct 2006 14:29:52 -0700
Message-ID: <1161206986.896207@bubbleator.drizzle.com>


sonofbr wrote:
> 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.

Agreed.

But it would be really nice to understand what it is that is happening.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Wed Oct 18 2006 - 16:29:52 CDT

Original text of this message

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