Re: SELECT question - Mailing list pgsql-general

From Medi Montaseri
Subject Re: SELECT question
Date
Msg-id 3E3AD4F0.1010400@intransa.com
Whole thread Raw
In response to Re: SELECT question  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-general
You can also use regular expression (which I am very happy to see PG has
adopted).

You can say

select whatever from whereever where something ~* 'brian';

The style is very similar to Perl's adoption of Regular Expression, its
called
Learn-Once-Use-Many.....

See page 77 of "PostgreSQL Developer's Handbook, SAMS" or your nearest
PG web page.

scott.marlowe wrote:

>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?
>>>
>>>
>
>the other method, which I forgot to add to my previous post is to user
>lower()
>
>select * from table where lower(name) like '%bruce%';
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>




pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Clearing tables questions
Next
From: Don Isgitt
Date:
Subject: Re: limited field duplicates