[thelist] SQL: checking for an empty date field

Tab Alleman talleman at avweb.com
Thu, 6 Jan 2000 19:15:08 -0000


whoa.  that worked.  :)  Ok, now equally important, how do I test for the
opposite?

Instead of "field <> Null"

would it be "field IS NOT Null"

or what?

-----Original Message-----
From: thelist-admin@lists.evolt.org
[mailto:thelist-admin@lists.evolt.org]On Behalf Of Michiel Trimpe
Sent: Thursday, January 06, 2000 19:03
To: thelist@lists.evolt.org
Subject: Re: [thelist] SQL: checking for an empty date field


I'm not 100% sure, but in MySQL "field = NULL" doesn't work.

It would have to be "field IS NULL" .

so IS instead of = .

Mike

----- Original Message -----
From: Tab Alleman <talleman@avweb.com>
To: <thelist@lists.evolt.org>
Sent: Thursday, January 06, 2000 6:49 PM
Subject: [thelist] SQL: checking for an empty date field


> I am trying to execute the following SQL query:
>
> SELECT * FROM Invoices WHERE Paid = Null AND SellerType = 1
>
> "Paid" is a Date/Time field in an Access db.  On Invoices that haven't
been
> paid, the field is blank (nothing has ever been entered into the field).
>
> When I enter this statement directly into Access as a query, it works
fine,
> and returns exactly the records I want.
>
> When I try to run it from an ASP page, I don't get errors, but it returns
no
> records, which is not correct.
>
> How should I be doing this?
>
>
> _______________________________________________________
> unsubscribe+options: http://lists.evolt.org/mailman/listinfo/thelist
> tip harvester: http://lists.evolt.org/harvest/
> email archive: http://lists.evolt.org/archive/
> http://evolt.org/  Workers of the Web, evolt !
>



_______________________________________________________
unsubscribe+options: http://lists.evolt.org/mailman/listinfo/thelist
tip harvester: http://lists.evolt.org/harvest/
email archive: http://lists.evolt.org/archive/
http://evolt.org/  Workers of the Web, evolt !