Re: simple query question

From: "Roderick A(dot) Anderson" <raanders(at)tincan(dot)org>
To: Dan Maher <dan(dot)maher(at)home(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: simple query question
Date: 2001-12-28 16:04:34
Message-ID: Pine.LNX.4.10.10112280756510.6298-100000@tincan.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Darley 2001-12-28 16:16:12 Re: Shutting down postgresql
Previous Message Jean-Michel POURE 2001-12-28 15:55:42 Re: PostgreSQL GUI