Default value could be a good solution, but I don't understand how I have never before run into this. Can't remember how many times I have used !=True to find all none True records. I have chosen not to use ==False as I know that default value is None for boolean. But I guess not so often has I havn't had problems with before.

I understand that None is a little bit odd value for a record, but I don't understand why !=True is not working as None definitly is not True and we are looking for anything but True.


Kenneth

Set the default value for your boolean column.  That way you won't
have any NULL values in there and you can select on True or False.

If you don't like that solution, try (db.mytable.boolean==None) |
(db.mytable.boolean==False) in your where clause.

If this conditions is ANDed with other conditions, be sure to enclose
it in parends to avoid order of evaluation problems.

On Jul 28, 2:17 am, Kenneth Lundström<kenneth.t.lundst...@gmail.com>
wrote:
Hello,

is it so that if I query a table and ask to get all rows where a fields
value is != True then all "None" rows are also exluded, only "False"
rows are included?

Kenneth

Reply via email to