home *** CD-ROM | disk | FTP | other *** search
/ ftp.robelle3000.ai 2014 / 2014.06.ftp.robelle3000.ai.tar / ftp.robelle3000.ai / faq / s3.txt < prev    next >
Text File  |  1995-10-10  |  833b  |  19 lines

  1. Validating field relationships.
  2.  
  3. The IF command can now support arithmetic operations between fields, even
  4. fields of different numeric data types. This is useful in checking some of the
  5. 'business rules' that most applications have. These rules are usually included
  6. in the data entry programs but sometimes 'stuff happens' and the data gets
  7. messed up.  Here is a  simple task that uses this new feature to isolate which
  8. records are breaking the rule of "Invoice amount = price times quantity".
  9.  
  10.      >base   sales.db,5,reader
  11.      >get    d-invoices
  12.      >if     price * quantity  <> amount
  13.      >list   standard title "Price * Qty not = Amount" device LP
  14.      >xeq
  15.  
  16. This idea can be used in a monthend job that prints exception reports. [Taken
  17. from the "Ensuring Data Integrity Using Suprtool" tutorial given at Interex in
  18. Toronto.]
  19.