Multiple WHERE Clause using AND (1 Viewer)

jsdba

Registered User.
Local time
Today, 13:49
Joined
Jun 25, 2014
Messages
165
Fellow Access Developers,

Im writing a SELECT SQL query on a table that has 2 checkboxes (Checkbox1 and Checkbox2). i need to retrieve records with the following:


if Checkbox1 is False and Checkbox2 is False - select record
if Checkbox1 is True and Checkbox2 is True - select record
if Checkbox1 is True and Checkbox2 is False - dont select record


How do i write this where clause?

Thanks,
 

plog

Banishment Pending
Local time
Today, 12:49
Joined
May 11, 2011
Messages
11,658
WHERE [Checkbox1]=[Checkbox2]

Of course you left out one case (false-true), but I assume you would want to exclude that.
 

jsdba

Registered User.
Local time
Today, 13:49
Joined
Jun 25, 2014
Messages
165
WHERE [Checkbox1]=[Checkbox2]

Of course you left out one case (false-true), but I assume you would want to exclude that.

There can never be False - True as per application logic. But thanks let me try your solution
 

plog

Banishment Pending
Local time
Today, 12:49
Joined
May 11, 2011
Messages
11,658
There can never be False - True as per application logic

One of my side gigs is winning bets about peoples false assumptions about their data. Took about $100 but my boss never wagers with me any more.
 

Users who are viewing this thread

Top Bottom