Re: SELECT question - Mailing list pgsql-general

From scott.marlowe
Subject Re: SELECT question
Date
Msg-id Pine.LNX.4.33.0301301615130.23648-100000@css120.ihs.com
Whole thread Raw
In response to Re: SELECT question  (Brian Avis <brian.avis@searhc.org>)
List pgsql-general
On Thu, 30 Jan 2003, Brian Avis wrote:

> Assuming the data in the text field will resemble any of the following.
>
> Brian K. Avis
> Brian Avis
> Brian
>
> Or whatever combo.
>
>
> Brian Avis wrote:
>
> > I want to run a SELECT on a text field and match any of the following.
> >
> > brian
> > Brian
> > BRIAN
> >
> > Or any other combination.   How do I tell SQL to ignore case when
> > doing a SELECT?

IF you're running 7.3.x, then you might need to use a tardis to go back in
time and make sure you used the C locale when you initdb'd your database.
If you didn't do that, then you'll need to backup your database and
reinitdb it with the C locale, then reload your data to make this work.
If you're on 7.2 and before, you won't have to reload your data to make
this next bit work...

Use a select with ilike:

select * from table where field ilike '%brian%';

should work.


pgsql-general by date:

Previous
From: Brian Avis
Date:
Subject: Re: SELECT question
Next
From: "scott.marlowe"
Date:
Subject: Re: SELECT question