List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:June 4 2004 1:32am
Subject:IS NULL works, but IN (NULL) doesn't
View as plain text  
How come this one works:

SELECT wifi_list,	IFNULL(wifi_list, 0) as wifi_list_new, 
FROM wifi_table LEFT JOIN Swordfish.scanner ON scanner.scanner_id =
wifi_table.scanner_id LEFT JOIN wifi_wlist_table ON wifi_table_mac = mac 
WHERE last_seen >= CURRENT_DATE AND wifi_list IS NULL;

This one works too

SELECT wifi_list, IFNULL(wifi_list, 0) as wifi_list_new, 
FROM wifi_table LEFT JOIN Swordfish.scanner ON scanner.scanner_id =
wifi_table.scanner_id LEFT JOIN wifi_wlist_table ON wifi_table_mac = mac 
WHERE last_seen >= CURRENT_DATE HAVING wifi_list_new IN (0,1,2);

But this one doesn't... I *need* this to work:

SELECT wifi_list,	IFNULL(wifi_list, 0) as wifi_list_new, 
FROM wifi_table LEFT JOIN Swordfish.scanner ON scanner.scanner_id =
wifi_table.scanner_id LEFT JOIN wifi_wlist_table ON wifi_table_mac = mac 
WHERE last_seen >= CURRENT_DATE AND wifi_list IN (NULL);


mysql  Ver 12.22 Distrib 4.0.16, for pc-linux (i686)

Thread
IS NULL works, but IN (NULL) doesn'tDaevid Vincent4 Jun
  • Re: IS NULL works, but IN (NULL) doesn'tPaul DuBois4 Jun
    • RE: IS NULL works, but IN (NULL) doesn'tDaevid Vincent6 Jun
      • RE: IS NULL works, but IN (NULL) doesn'tPaul DuBois6 Jun