Re: simple query question

Поиск
Список
Период
Сортировка
От Roderick A. Anderson
Тема Re: simple query question
Дата
Msg-id Pine.LNX.4.10.10112280756510.6298-100000@tincan.org
обсуждение исходный текст
Ответ на simple query question  ("Dan Maher" <dan.maher@home.com>)
Список 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 по дате отправления:

Предыдущее
От: Troy.Campano@LibertyMutual.com
Дата:
Сообщение: Re: Shutting down postgresql
Следующее
От: "Peter Darley"
Дата:
Сообщение: Re: Shutting down postgresql