RE: [PHP-DB] finding records wiht non-null columns
| From: | NCI/IMS) | Date: | Thu, 03 Jan 2002 16:23:57 +0000 |
| Subject: | RE: [PHP-DB] finding records wiht non-null columns | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15333@lists.php.net to get a copy of this message | ||
In my database (Sybase) that won't work. You have to use
not like 'NULL'
or it gives an error about not using text in a where clause unless you use
like. Weird, but it will work with the not like 'NULL'.
-Natalie
> -----Original Message-----
> From: Jonathan Hilgeman [SMTP:JHilgeman@ecx.com]
> Sent: Thursday, January 03, 2002 11:21 AM
> To: 'bill'
> Cc: 'php-db@lists.php.net'
> Subject: RE: [PHP-DB] finding records wiht non-null columns
>
> ...WHERE some_column IS NOT NULL;
>
> - Jonathan
>
> -----Original Message-----
> From: bill [mailto:bill@billtron.com]
> Sent: Thursday, January 03, 2002 8:19 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] finding records wiht non-null columns
>
>
> Is there a better query than
>
> SELECT *
> FROM some_database
> WHERE some_column <> ""
>
> I had tried
>
> WHERE some_column <> NULL but that didn't work.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net