Object Oriented Filtering (OOF) - Dragan S. Pusonjic
Previous Table of Contents Next

See also :

Advanced extended objects

Modify methods and properties


Extended advance             
 

Extended advance

 

The OR object                               
This object is even larger extension of the advanced extended object. Let’s have a look at one example which can be accomplished by the extended filtering object.
                        SELECT ;
                                    order. number_invoice ;
                                    order. order_date ;
                                    order.value_invoice ;
                                    order. payment ;
                                    customer. company_name ;
                        FROM order, customer ;
                         WHERE ( BETWEEN(order.value_invoice = 200,220)     .OR. ;
                                        BETWEEN(order.value_invoice = 300,330)      .OR. ;
                                        BETWEEN( order.value_invoice = 660,662)     .OR. ;
                                        BETWEEN(order.value_invoice = 1020,1270)  .OR. ;
                                        order.value_invoice => 1900)

Mark the following expression by cxExtWhereCond:
            cxExtWhereCond  = ;
                                            ( BETWEEN(order.value_invoice = 200,220)     .OR. ;
                                              BETWEEN(order.value_invoice = 300,330)      .OR. ;
                                              BETWEEN( order.value_invoice = 660,662)     .OR. ;
                                              BETWEEN(order.value_invoice = 1020,1270)  .OR. ;
                                              order.value_invoice => 1900)

Following is the common feature of the entire expression:
            1)       Inter operator (in this particular situation .OR.) is common for every cxExtWhereCond member,
                     that is, operator OR or AND can not be mixed.
           
2)       If you apply the negation of this expression, it would be based on the entire expression, that is, cxExtWhereCond  = ;

        cxExtWhereCond  = ;
                            .NOT. ( BETWEEN(order.value_invoice = 200,220)     .OR. ;
                                          BETWEEN(order.value_invoice = 300,330)      .OR. ;
                                          BETWEEN( order.value_invoice = 660,662)     .OR. ;
                                          BETWEEN(order.value_invoice = 1020,1270)  .OR. ;
                                          order.value_invoice => 1900)

These inconveniences could be overcome with the OR object. For instance:
                    cxExtWhereCond  = ;
                                                   (  .NOT. BETWEEN(order.value_invoice = 200,220)     .OR. ;
                                                                 BETWEEN(order.value_invoice = 300,330)      .OR. ;
                                                                 BETWEEN( order.value_invoice = 660,662)     .OR. ;
                                                                 BETWEEN(order.value_invoice = 1020,1270)  .AND. ;
                                                                 order.value_invoice => 1900)

See also :

Advanced objects

Modify methods and properties


In list   
Or condition
Variable           

 

In list   
Or condition
   
Variable


Previous Table of Contents Next