Re: [sqlite] matching only part of a string

2007-03-28 Thread drh
"P Kishor" <[EMAIL PROTECTED]> wrote:
> On 3/28/07, Lloyd K L <[EMAIL PROTECTED]> wrote:
> > Hi,
> >   My table contains a text field called Name. Let the data be
> >
> > Name
> > ---
> > Abc
> > abcd
> > AB
> > cab
> > def
> >
> > I want to selcct all the rows which contains the term ab (not case
> > sensitive). How can I do this?
> >
> 
> SELECT name FROM table WHERE Lower(name) LIKE '%ab%'l
> 

This works, but the lower() is redundant.  LIKE is already
case insensitive.  So just "... WHERE name LIKE '%ab%'" should
get the job done.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] matching only part of a string

2007-03-28 Thread P Kishor

On 3/28/07, Lloyd K L <[EMAIL PROTECTED]> wrote:

Hi,
  My table contains a text field called Name. Let the data be

Name
---
Abc
abcd
AB
cab
def

I want to selcct all the rows which contains the term ab (not case
sensitive). How can I do this?



SELECT name FROM table WHERE Lower(name) LIKE '%ab%'l

--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] matching only part of a string

2007-03-27 Thread Dan Kennedy
On Wed, 2007-03-28 at 12:27 +0530, Lloyd K L wrote:
> Hi,
>   My table contains a text field called Name. Let the data be
> 
> Name
> ---
> Abc
> abcd
> AB
> cab
> def
> 
> I want to selcct all the rows which contains the term ab (not case
> sensitive). How can I do this?

SELECT name FROM "My table" WHERE name LIKE '%ab%'




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] matching only part of a string

2007-03-27 Thread Lloyd K L
Hi,
  My table contains a text field called Name. Let the data be

Name
---
Abc
abcd
AB
cab
def

I want to selcct all the rows which contains the term ab (not case
sensitive). How can I do this?

Thanks in advance,
  Lloyd


-
This email was sent using SquirrelMail.
   "Webmail for nuts!"
http://squirrelmail.org/


__
Scanned and protected by Email scanner

-
To unsubscribe, send email to [EMAIL PROTECTED]
-