S/List User Manual

Introduction

S/List Overview

Starting S/List

S/List Report

S/List Query

S/TCL

Keystrokes

Appendix A

Appendix B

Appendix C - LIST Keywords

Back Home Up Next


 
 

Appendix B: AND and OR logic

To understand AND logic and OR logic, you have to have to understand the following statements:

"A AND B returns true if BOTH A AND B are true."

For example - when selecting records from the CANDIDATE table, if the CANDIDATE_AGE field is Greater than (>) 21, AND if the CANDIDATE_SEX field is equal to "MALE", then we would like to see this record. This is the process of filtering the selection criteria. In the "New Query Wizard" it looks like this.
 


Figure 54: AND dialog box

The next statement goes like this:

"A OR B returns true if EITHER A is true, OR if B is true."

For example - when selecting records from the CANDIDATE table, if EITHER the CANDIDATE_AGE field is Greater than (>) 21, OR if the CANDIDATE_SEX field is equal to "MALE", then we would like to see this record. In the "New Query Wizard" it looks like this.


Figure 55: OR dialog box

Using parentheses GROUPS selection criteria together. This means that ALL of the selection criteria, coupled with their ANDs and ORs within the parentheses, must return true for the group to return true.

For example - when selecting records from the CANDIDATE table, if EITHER

(The CANDIDATE_AGE field is Greater than (>) 21 AND the CANDIDATE_SEX field is equal to "MALE"),

OR

(The CANDIDATE_AGE field is Greater than (>) 31 AND the CANDIDATE_SEX field is equal to "FEMALE"),

Then we would like to see this record. In the "New Query Wizard" it looks like this.


Figure 56: AND/OR logic

This explains the function of AND and OR logic.

[top]

Copyright © 2005 The Sprezzatura Group. All rights reserved.