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