home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / qdrsum.zip / SELECT.DOC < prev   
Text File  |  1987-10-21  |  3KB  |  59 lines

  1.                        SELECTION CRITERIA SPECIFICATION                        
  2.  
  3.  
  4.      The standard input is read for a list of selection criteria of records to 
  5. include in the report.  To include ALL records in the database, enter an empty 
  6. line (press RETURN at start of line) after the SUMMARY call,  otherwise  enter 
  7. lines like the following:
  8.  
  9.      FIELD1="VALUE1"  &  FIELD2<"VALUE2"
  10.      FIELD3!="VALUE3"
  11.      FIELD4>"VALUE4"
  12.  
  13.  
  14. where FIELDn is a database field name and VALUEn is a possible value.  End the 
  15. list by a blank line.  Using redirection,  the selection list can be read from 
  16. a file:   place  <SELCTFIL  on the call line,  where SELCTFIL is the selection 
  17. list file name.
  18.  
  19.      The syntax for a line,  called a selector,  is one or more field compari- 
  20. sons or record specifiers,  separated by the AND operator (&).   A  record  is 
  21. selected if it satisfies all of the comparison tests on a line.
  22.  
  23.      A field comparison comprises a field name specifier,  a comparison opera- 
  24. tor,  and a value.   A field name specifier picks the first field in the data- 
  25. base  record  whose  name's leading characters exactly match the given charac- 
  26. ters.  The comparison operators are: '=', '<', '>', '!=', '<=', and '>=', with 
  27. their usual meanings.  Enclose values in double quotation marks.  A value con- 
  28. taining fewer characters than the specified field is compared with the leading 
  29. characters of the field.  Excess characters in the value are ignored.   Satis- 
  30. fying any line's criteria selects a record for  the  report's  statistics  and 
  31. displays. 
  32.  
  33.      A record specifier consists of the character '#',  a comparison operator, 
  34. and a decimal number.  Record numbers start at the value one,  and include any 
  35. deleted  records.    Records are in the sequence of the last sort performed by 
  36. PC-FILE+.   If the database has never been sorted,  then records  are  in  the 
  37. order  they  were  added to the database.   A record is selected if its record 
  38. number satisfies the record specifier's comparison.  For example:
  39.  
  40.      #<2
  41.  
  42. only selects the first record in the database.   Note that the value for  com- 
  43. parison is not enclosed in quotation marks--it must be a decimal number.   All 
  44. of the usual comparison operators can be used in a record specifier.
  45.  
  46.      The first example selects all records having VALUE1 in  the  first  seven 
  47. characters  of FIELD1 and whose FIELD2 value's first six characters are alpha- 
  48. betically lower than VALUE2,  plus those records which do not have  VALUE3  in 
  49. the  first  six characters of FIELD3,  plus those records whose FIELD4 value's 
  50. first six characters are alphabetically higher than VALUE4.
  51.  
  52.      All string comparisons are made against ASCII sort  order.    Thus,   the 
  53. space  character  precedes all other characters,  and numbers precede letters. 
  54. "FOR " is lower than "FORM" and "VALUE2" will precede "VALUED".    Lower  case 
  55. letters  come  later  in the ASCII order than upper case letters,  but case is 
  56. usually ignored, so "aB" equals "Ab".  The /U option turns on case sensitivity 
  57. in the string comparisons.
  58.                                                                                
  59.