RE: [PHP] Nulls in database
| From: | Carlos Andre Marques Moreira | Date: | Thu, 01 Feb 2001 17:47:21 +0000 |
| Subject: | RE: [PHP] Nulls in database | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5321@lists.php.net to get a copy of this message | ||
Actually you should use is null, or is not null (if you want to retrieve the
rows that don't have null values), either uppercase or lowercase.
Your query should be something like that:
SELECT [ID], [Project Name], [Start Construction Date], [Actual Completion
Date]
FROM common WHERE [Start Construction Date] is null OR [Actual Completion
Date] is null
-----Original Message-----
From: Juan [mailto:Juan@acomme.fr]
Sent: quinta-feira, 1 de fevereiro de 2001 14:15
To: Conover, Ryan
Cc: php-general@lists.php.net; php-windows@lists.php.net
Subject: Re: [PHP] Nulls in database
Réponse au message
| [PHP] Nulls in database |
du jeudi 1 février 2001, 18:05 :
This is from memory concerning my old SQL class but isn't there
something specific in sql lines saying that to find null values you
should use :
ISNULL
Since an empty string is different from a null entry.
CR> I am trying to write a query to bring back rows that have null values
set in
CR> them. I cannot figure out how to do this. I can bring back all rows that
do
CR> not have nulls with the following query.
CR> SELECT [ID], [Project Name], [Start Construction Date], [Actual
Completion
CR> Date]
CR> FROM common WHERE [Start Construction Date] != ' ' OR [Actual Completion
CR> Date] != ' '
CR> I tried changing the != to = but it does not return anything.
CR> I am running these queries off a MSSQL 7.0 Server
CR> Ryan
_______________________________________
Massuelles Jean-Baptiste(Juan@acomme.fr)
Société A Comme...
Tel : 03 80 700 702