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.