DQH70
=> --------------------------------------------------------------------------DQH70 DATAQUERY: SELECTION CRITERIA: DEFINE CONDITION QUERY NAME: USER-SAMPLE ------------------------------------------------------------------------------- Define the condition by selecting a comparison operator and a value to compare with SHIP-QTY in CAI-DETAIL-TBL Select one comparison operator: _ Equal (EQ) _ Greater than (GT) _ Less than (LT) _ Not equal (NE) _ Greater than or equal (GTE) _ Less than or equal (LTE) _ Containing Enter values for comparison with SHIP-QTY _______________________________________________________________________________ _______________________________________________________________________________ _______________________________________________________________________________ _______________________________________________________________________________ _______________________________________________________________________________ ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> REPEAT COLUMN <PF4> CONTINUE <PF5> EXTEND COLUMN <PF6> DISPLAY QUERY <PF7> NOT USED <PF8> NOT USED
Purpose
The optional SELECTION CRITERIA: DEFINE CONDITION panel appears for every column selected as a Selection Criteria column in the previous step. With it, you describe the data you want to be used in qualifying a row for inclusion in your report. You do that by defining a logical expression, which can be simple or complex. For example, you can specify that you only want rows with a certain zip code or with amounts falling in a specific range, or with a column containing a certain value.
Concepts
These are the major concepts related to this panel:
Value
The exact characters you want to find or a column name from the secondary table, if the columns qualify for matching.
Comparison Operator
A comparison operator that tells CA Dataquery how to compare the value to the data. For instance, if a ZIP CODE value is 75081, and you want only rows with that zip code, you will select Equal as the comparison operator and complete the panel so that CA Dataquery searches the ZIP CODE column for data Equal to 75081.
Note: For more information about value comparisons, see the CA Dataquery Reference Guide.
You can select from these operators:
Select value exactly
Select data with higher value
Select data lower than value
Select data that does not match
Select data of equal or higher value
Select same or lower value
Select data that contains value
Values for comparison
(Masking) You can enter an exact value here to search for the value. You can mask certain positions in the column to tell CA Dataquery you want to find the value in positions other than the first ones. If containing is your comparison operator, you can enter a value that you want found somewhere in the column. You can even write a column name or key name from a primary or secondary table, if you selected one, that you want CA Dataquery to use in qualifying the search for rows. The rules for comparison values are detailed in the CA Dataquery Reference Guide.
Panel Operation
On this panel, the Tab key moves the cursor from one field to another. Type entries and press <PF4> CONTINUE (or Enter) to display the next panel.
Completed Example
The following completed panel shows how a completed SELECTION CRITERIA: DEFINE CONDITION panel produces the sample report.
=> --------------------------------------------------------------------------DQH70 DATAQUERY: SELECTION CRITERIA: DEFINE CONDITION QUERY NAME: USER-SAMPLE ------------------------------------------------------------------------------- Define the condition by selecting a comparison operator and a value to compare with SHIP-QTY in CAI-DETAIL-TBL Select one comparison operator: _ Equal (EQ) X Greater than (GT) _ Greater than or equal (GTE) _ Less than (LT) _ Less than or equal (LTE) _ Containing _ Use "NOT" before the operator selected above Enter values for comparison with SHIP-QTY 0______________________________________________________________________________ _______________________________________________________________________________ _______________________________________________________________________________ _______________________________________________________________________________ _______________________________________________________________________________ ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> REPEAT COLUMN <PF4> CONTINUE <PF5> EXTEND COLUMN <PF6> DISPLAY QUERY <PF7> NOT USED <PF8> NOT USED
This chart explains each entry/selection.
|
Field or Item |
Sample Entry: |
Reason |
|---|---|---|
|
Greater than (GT) |
X |
The only rows needed are for customers who were shipped orders. Therefore, the ship quantity greater than zero (0). |
|
Value entered |
0 |
See above. |
Options
You could apply very complex selection conditions to narrow your search for qualified rows.
You could create an arithmetic expression or a literal expression as the basis of your selection condition. To read more about the rules for such expressions, see the CA Dataquery Reference Guide.
To Go to the Next Step
When SHIP-QTY GT 0 is defined, pressing <PF4> CONTINUE displays the next panel.
If two columns were selected on the DESIGNATE COLUMNS (DQH60) panel with defined conditions for each, or if <PF3> REPEAT COLUMN were used to define the SHIP-QTY column more than once, CA Dataquery would now display a new panel to group the conditions into a logical expression. The expression would be written on the additional panel.
For example, having selected ZIP and STREET and having said to select rows where ZIP equals 15081 and where the STREET value is Main St. requires that the condition be stated according to CA Dataquery syntax rules. The additional panel presents a default expression that could be altered. Here is what that panel would look like:
=> --------------------------------------------------------------------------DQH80 DATAQUERY: SELECTION CRITERIA: MULTIPLE CONDITIONS QUERY NAME: SAMPLE ------------------------------------------------------------------------------- Below are the conditions you defined to qualify records selected from table CAI-CUST-TBL Use the logical operators "AND", "OR", "(", and ")" to logically group your conditions. The default statement appears below. You may type over it to change it. => 01 AND 02 ------------------------------------------------------------------------------- NUMBER| KEY (*) AND COLUMN NAMES |COMPARISON OPERATOR(S) AND VALUE(S) ------------------------------------------------------------------------------- 01 | ZIP | EQ 15081 02 | STREET | 'MAIN ST.' | | | | | | | | ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> CONTINUE <PF5> NOT USED <PF6> DISPLAY QUERY <PF7> BACKWARD <PF8> FORWARD
For this example, the default statement created by CA Dataquery is correct. See the CA Dataquery Reference Guide for more information about using this panel.
When the next panel appears, you can press <PF6> DISPLAY QUERY to see what the query looks like so far.
=> --------------------------------------------------------------------------DQHN0 DATAQUERY: GUIDED QUERY DISPLAY QUERY NAME: _______________ ------------------------------------------------------------------------------- ================================ T O P ====================================== FIND ALL CAI-DETAIL-TBL WITH SHIP-QTY GT 0 ============================== B O T T O M ================================== ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> NOT USED <PF5> NOT USED <PF6> NOT USED <PF7> BACKWARD <PF8> FORWARD
The query tells CA Dataquery to read (FIND) all CAI-DETAIL-TBL table rows that have (WITH) a ship quantity greater than 0 in the search for data.
|
Copyright © 2014 CA.
All rights reserved.
|
|