Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Patrik Kudo

select * from Apples where lower(color) like '%red%';

ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Känns det oklart? Fråga på!

On 9 Sep 2001, Michael Gay wrote:

 If I am doing a command such as

 select * from Apples where color like '%red%';

 how do I make it case insensitive?

 Thanks.

 mike

 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Matthew Rice

Szabo Zoltan [EMAIL PROTECTED] writes:
 Use: ILIKE
 
  If I am doing a command such as
  select * from Apples where color like '%red%';
  how do I make it case insensitive?

I was trying to solve a similar problem where I wanted an exact match to work
in PostgreSQL and MySQL and ended up with:

lower(Field) = lower('string')

Is there another way that works on both?
-- 
matthew rice [EMAIL PROTECTED]   starnix inc.
tollfree: 1-87-pro-linuxthornhill, ontario, canada
http://www.starnix.com  professional linux services  products

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[GENERAL] Case sensitivity issue

2001-09-14 Thread Michael Gay

If I am doing a command such as

select * from Apples where color like '%red%';

how do I make it case insensitive?

Thanks.

mike

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Mitch Vincent

SELECT * FROM apples WHERE lower(color) LIKE '%red%';

Make sure that what ever 'red' might be is always lower case (you can pass
it through lower() too, of course)..

-Mitch


- Original Message -
From: Michael Gay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 12:02 AM
Subject: [GENERAL] Case sensitivity issue


 If I am doing a command such as

 select * from Apples where color like '%red%';

 how do I make it case insensitive?

 Thanks.

 mike

 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Jeff Eckermann

use ILIKE instead of LIKE
or use a regular expression match: ~* 'red'

- Original Message - 
From: Michael Gay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 09, 2001 11:02 PM
Subject: [GENERAL] Case sensitivity issue


 If I am doing a command such as
 
 select * from Apples where color like '%red%';
 
 how do I make it case insensitive?
 
 Thanks.
 
 mike
 
 ---(end of broadcast)---
 TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
 
 


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly