your gewijzigd is text, not a boolean in the example you sent
ONWAAR I believe is false so neither of those two records would be returned
what does get returned is ID 184280 which meets the 'OR' part of your criteria
So the criteria is doing what it is supposed to be doing. If that is not what you want, clarify what you do want with examples
This is the sql I used
Code:
SELECT TestSql.*
FROM TestSql
WHERE (((TestSql.[progress])<100) AND ((TestSql.[WPID])=43300) AND ((TestSql.[Plankaart])="plk02")) OR (((TestSql.[progress])=100) AND ((TestSql.[WPID])=43300) AND ((TestSql.[Plankaart])="plk02") AND ((TestSql.[gewijzigd])='WAAR'));
and this is the result
ID |
WPID |
Plankaart |
gewijzigd |
progress |
184210 |
43300 |
Plk02 |
ONWAAR |
0 |
184221 |
43300 |
Plk02 |
ONWAAR |
0 |
184247 |
43300 |
Plk02 |
ONWAAR |
0 |
184253 |
43300 |
Plk02 |
ONWAAR |
0 |
184255 |
43300 |
Plk02 |
ONWAAR |
0 |
184280 |
43300 |
Plk02 |
WAAR |
100 |
184291 |
43300 |
Plk02 |
ONWAAR |
0 |
184292 |
43300 |
Plk02 |
ONWAAR |
0 |