Re: Non case sensitive

From: Brendon Gleeson <brendon(at)gleesonprop(dot)co(dot)za>
To: roy simkes <roysimkes(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Non case sensitive
Date: 2006-08-14 13:29:04
Message-ID: 44E07AA0.3080702@gleesonprop.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

roy simkes wrote:
> Is there a way that select's where clause can be used as insensitive to
the case? I mean:
> "SELECT * FROM table WHERE field LIKE 'f' " will return every row that
field begins with a "f" or a "F". Without writing " field LIKE 'f' OR field
LIKE 'F' " of course.

try:
"SELECT * FROM table WHERE LOWER(field) LIKE 'f'"

or:
"SELECT * FROM table WHERE LOWER(field) LIKE LOWER(x)" <-- if using
variable "x"

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message ben sewell 2006-08-14 14:03:59 Re: can someone tell me what's wrong with this procedure?
Previous Message roy simkes 2006-08-14 13:27:31 Re: Non case sensitive