You are trying to compare for a value that does not match, correct? Try
this:

SELECT [ID], [Project Name], [Start Construction Date], [Actual Completion
Date] FROM common WHERE [Start Construction Date] <> '' OR [Actual
Completion Date] <> ''

Also, your query was saying if [Start Construction Date] is not equal to ' '
(space character).
In SQL the not equal to comparison "!=" is actually "<>".

-Toby

----- Original Message -----
From: "Richard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 12:06 PM
Subject: RE: [PHP-WIN] Nulls in database


> I don't know ANYTHING about ANY of this stuff...but where I come from (C)
> you would use 2 equal signs (==) to match values.  Dunno if that applies
> here, but usually when you use 1 equal sign, you are assigning values.
>
> Rick
>
> -----Original Message-----
> From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 12:05 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-WIN] Nulls in database
>
>
> I am trying to write a query to bring back rows that have null values set
in
> them. I cannot figure out how to do this. I can bring back all rows that
do
> not have nulls with the following query.
>
> SELECT [ID], [Project Name], [Start Construction Date], [Actual Completion
> Date]
> FROM common WHERE [Start Construction Date] != ' ' OR [Actual Completion
> Date] != ' '
>
> I tried changing the != to = but it does not return anything.
>
> I am running these queries off a MSSQL 7.0 Server
>
> Ryan
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to