| From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Cc: | Wes James <comptekki(at)gmail(dot)com> |
| Subject: | Re: why these results? |
| Date: | 2011-08-01 23:00:31 |
| Message-ID: | 201108011600.31822.adrian.klaver@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(dot)klaver(at)gmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Reinoud van Leeuwen | 2011-08-01 23:01:09 | Re: why these results? |
| Previous Message | Wes James | 2011-08-01 22:50:00 | why these results? |