http://www.ClipX.Net [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  With SCOPE:

  Mach SIx will respect any active index SCOPE while optimizing queries. For
  example,  doing a COUNT with a SCOPE set will return the number of records
  within the SCOPE that match the condition.  If no condition was specified,
  the total number of records in SCOPE will be returned.


  Example:

     USE Customers
     SET INDEX TO State, Name
     SET ORDER TO 2

     SET SCOPE TO "E"

     ? m6_IsOptimize()    //  Returns 2

     ? "Total: "
     COUNT TO nCount
     ?? nCount

     ? "Total: "
     COUNT TO nCount FOR state == "CA"
     ?? nCount



Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson