Reporting : Native reporting system : Reporting system command language : AND condition
  
AND condition
Use the AND condition to extract this AND this AND this. The AND condition is communicated by use of successive WHERE command statements that result in a selection only when each condition in all of the statements are met. The structure of the successive WHERE commands is:
WHERE field-identifier-1 operator test-field-value-1
WHERE field-identifier-2 operator test-field-value-2
This WHERE statement specifies “search the Entity Table for values in which both the conditions specified by the first WHERE and second WHERE statement are met, and include the result in the extraction database”.
Example – AND conditions in WHERE commands
These are three examples of the WHERE command.
Example 1
These WHERE statements select from the encyclopedia, diagrams that are Gane & Sarson DFDs AND are level 1 child diagrams.
WHERE Class = Diagram
WHERE Type = "Data Flow Gane & Sarson"
WHERE Level = 1
These WHERE statements select from the encyclopedia, diagrams that are Gane & Sarson DFDs AND are level 1 child diagrams.
Example 2
These WHERE statements select all the information in the encyclopedia updated during a six month period beginning July 1, 2000 and ending December 31, 2000.
WHERE "Update Date" >= 7/1/2000
WHERE "Update Date" <= 12/31/2000
Example 3
When the WHERE command statements in examples 1 and 2 are used together, then only the Gane & Sarson level 1 child diagrams updated between July 1, 2000 and December 31, 2000 are included in the extraction database.
WHERE Class = Diagram
WHERE Type = "Data Flow Gane & Sarson"
WHERE Level = 1
WHERE "Update Date" >= 7/1/2000
WHERE "Update Date" <= 12/30/2000
Parent topic
Reporting system command language