Re: Nulls in database

From: Date: Thu, 01 Feb 2001 17:28:13 +0000
Subject: Re: Nulls in database
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-5319@lists.php.net to get a copy of this message
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" <richard@computech1.com> To: <php-windows@lists.php.net> 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:Rconover@americanbridge.net] > Sent: Thursday, February 01, 2001 12:05 PM > To: php-general@lists.php.net; php-windows@lists.php.net > 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: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#5319) next »