You can't compare NULL values using <>, you need this SQL:

SELECT id, test_field FROM test_tableWHERE *(test_field <> "test_string")* OR 
*(test_field is null)* 

Therefore use this query:
*db**((db.test_table.test_field != "test_string")|**(db.test_table.test_field 
== None)).count()*

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to