Re: simple query question - Mailing list pgsql-general

From Roderick A. Anderson
Subject Re: simple query question
Date
Msg-id Pine.LNX.4.10.10112280756510.6298-100000@tincan.org
Whole thread Raw
In response to simple query question  ("Dan Maher" <dan.maher@home.com>)
List pgsql-general
On Mon, 17 Dec 2001, Dan Maher wrote:

> Thanks in advance:
>

I've seen several replies but can't remember if you came up with a
solution so I'll add my $0.02 worth.

UPDATE blah
   SET whatever = 'whatever'
 WHERE lower(actor) LIKE '%jack nicholson%'
   AND lower(movie) LIKE '%one flew over the cuckoo's nest%';

The unescaped single quote will probably give you the fits.

If you know for sure the actor and movie then LIKE is probably not what
you want.  A simple equals '=' should work.

> actor                   movie
> ------                 --------
> jack nicholson     One flew over the cuckoo's nest
>
> What I have been trying is
>
> UPDATE blah WHERE actor LIKE
> "jack nicholson - one flew over the cuckoo's nest"
> OR movie LIKE
> "jack nicholson - one flew over the cuckoo's nest"
>

Good Computing,
Rod
--
                      Let Accuracy Triumph Over Victory

                                                       Zetetic Institute
                                                        "David's Sling"
                                                         Marc Stiegler


pgsql-general by date:

Previous
From: Troy.Campano@LibertyMutual.com
Date:
Subject: Re: Shutting down postgresql
Next
From: "Peter Darley"
Date:
Subject: Re: Shutting down postgresql