2.4.2 Range of Values Examples
These examples illustrate the use of the range of values rule facility:
Example 1
Column being checked:
Name | Type | Len | Dec |
|---|---|---|---|
POSTCD | A | 4 |
Range of values:
From Value | To Value | Comments | |
|---|---|---|---|
| '2000' | '2900' | Check post code is in NSW, VIC or QLD. Post code is numeric. |
Example 2
Column being checked:
Name | Type | Len | Dec |
|---|---|---|---|
POSTCD | S | 4 | 0 |
Range of values:
From Value | To Value | Comments | |
|---|---|---|---|
| 2000 | 2900 | Check post code is in NSW, VIC or QLD. Post code is numeric. |
Example 3
Column being checked:
Name | Type | Len | Dec |
|---|---|---|---|
AMOUNT | P | 5 | 2 |
Range of values:
From Value | To Value | Comments |
|---|---|---|
0.01 | 999.99 | Check that AMOUNT is positive. |
Example 4
Column being checked:
Name | Type | Len | Dec |
|---|---|---|---|
AMOUNT | P | 5 | 2 |
Range of values:
From Value | To Value | Comments |
|---|---|---|
-999.99 | -0.01 | Check that AMOUNT is negative. |
Example 5
Column being checked:
Name | Type | Len | Dec |
|---|---|---|---|
PERIOD | A | 2 |
Range of values:
From Value | To Value | Comments |
|---|---|---|
*LASTPER | *NEXTPER | Check PERIOD using site defined system variables *LASTPER and *NEXTPER. |