Yes/No Criteria in A Base Query

Asked by Alan Curley

I'm transitioning from MS Access. If I'm performing a query in a yes/no column (field is checked for yes or unchecked for no) in "criteria" box a simple "yes" or "y" will return all the checked boxes. Base tells me "the entered criterion cannot be compared to this field". Can't find this answer in any "help" or "getting started with base" What's the secret? I've tried "is null", "not null" ">1" etc, etc.

thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Solved by:
Tony Pursell
Solved:
Last query:
Last reply:
Revision history for this message
Best Tony Pursell (ajpursell) said :
#1

Hi Alan

I'm not too sure, but if these are Boolean values, you need to compare with TRUE and FALSE (and possibly also UNKNOWN).

For instance

SELECT * FROM "Plants" WHERE "Favourite" = True

Tony

Revision history for this message
Alan Curley (apcurley) said :
#2

YES! That was it!

Thanks.
Alan

Revision history for this message
Tony Pursell (ajpursell) said :
#3

Great! just one little correction - the condition to use to select rows with no value is 'IS EMPTY' and not 'UNKNOWN'

Tony