Re: why these results?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: why these results?
Дата
Msg-id 201108011600.31822.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на why these results?  (Wes James <comptekki@gmail.com>)
Список pgsql-sql
On Monday, August 01, 2011 3:50:00 pm Wes James wrote:
> select count(*) from table;
> 
> count
> -------
>    100
> (1 row)
> 
> 
> is correct
> 
> select count(*) from table where col::text ~~* '%text%';
> 
> count
> -------
>      1
> (1 row)
> 
> is correct.
> 
> But now if I do:
> 
> 
> select count(*) from table where col::text !~~* '%text%';
> count
> -------
>   98
> (1 row)
> 
> Shouldn't it be 99?  That is out of 100 records there is one that has
> "text" in column "col" so the !~~* should return 99 rows.  ??

NULL  value in field?

> 
> -wes

-- 
Adrian Klaver
adrian.klaver@gmail.com


В списке pgsql-sql по дате отправления:

Предыдущее
От: Wes James
Дата:
Сообщение: why these results?
Следующее
От: Reinoud van Leeuwen
Дата:
Сообщение: Re: why these results?