Databases Reference
In-Depth Information
How it works...
In step 2, we collect the quantity sold and the date from the SALES table in two arrays and
then we loop through this array to count the records that satisfy these two conditions:
1.
The quantity is greater than 1.
2.
The sale took place before June 28, 1998.
We test these two conditions in the same order, obtaining the following output:
In step 3, the only difference in our script is the order in which the conditions are tested
using the IF statement, which is reversed as follows:
IF TAB_TIME(J) < '27-JUN-98' AND TAB_QTY(J) > 1 THEN
When we test the changed script again, we obtain the following output:
 
Search WWH ::




Custom Search