Value Constraint by Number
If the fact with a numerical value didn't have the normalized numerical value with a single UNIT_CD for a particular concept, then the user can tell the service to do the unit conversion of the NVAL_NUM column before applying the value constraints in the query.
The unit conversion of NVAL_NUM is calculated using the concept's metadata xml defined in the Ontology cell (<ConvertingUnits/>, <MultiplyingFactor/>).
To enable the unit conversion, set the following project parameter in the Project Management cell.
CRC_ENABLE_UNITCD_CONVERSION = ON | OFF
Value |
Description |
ON |
Unit conversion is enabled |
OFF |
Unit conversion is not enabled |
- This unit conversion option will slow down the query. For better query performance load, the numerical fact values in the in the normalized units and do not enable this option.
Greater than operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Numeric Constraint SQL: |
(valtype_cd = 'N' AND nval_num > 99.9 AND tval_char IN ('GE','E')) |
|
|
Less than operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Numeric Constraint SQL: |
(valtype_cd = 'N' AND nval_num < 99.9 AND tval_char IN ('LE','E')) |
|
|
Between operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Numeric Constraint SQL: |
(valtype_cd = 'N' AND nval_num BETWEEN 1 and 100 AND tval_char = 'E') |
|
|
Equal to operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Numeric Constraint SQL: |
(valtype_cd = 'N' AND nval_num = 99.9 AND tval_char = 'E') |
|
|
Less than and Equal to operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Numeric Constraint SQL: |
(valtype_cd = 'N' AND nval_num <= 99.9 AND tval_char IN ('L','E','LE') |
|
|
Greater than and Equal to operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Numeric Constraint SQL: |
(valtype_cd = 'N' AND nval_num >= 99.9 AND tval_char IN ('G','E','GE') |
|
|
Not Equal operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Numeric Constraint SQL: |
(valtype_cd = 'N' AND nval_num <> 99.9 AND tval_char <> 'NE') |
Value Constraint by Text
Equals operator |
|
Query Text Value Constraint: |
<constrain_by_value> |
Text Value Constraint SQL: |
valtype_cd = 'T' AND tval_char = 'H' |
|
|
Not equals operator |
|
Query Text Value Constraint: |
<constrain_by_value> |
Text Value Constraint SQL: |
valtype_cd = 'T' AND tval_char <> 'L' |
|
|
Like operator |
|
Query Text Value Constraint: |
<constrain_by_value> |
Text Value Constraint SQL: |
valtype_cd = 'T' AND tval_char LIKE 'L%') |
|
|
In operator |
|
Query Numeric Value Constraint: |
<constrain_by_value> |
Text Value Constraint SQL: |
valtype_cd = 'T' AND tval_char = ('A','B') |
|
|
Between operator |
|
Query Text Value Constraint: |
<constrain_by_value> |
Text Value Constraint SQL: |
valtype_cd = 'T' tval_char BETWEEN 'A' AND 'B' |
Value Constraint by Flag
Equals operator |
|
Query Flag Value Constraint: |
<constrain_by_value> |
Flag Value Constraint SQL: |
valueflag_cd = 'H' |
|
|
Not equals operator |
|
Query Flag Value Constraint: |
<constrain_by_value> |
Flag Value Constraint SQL: |
valueflag_cd <> 'H' |
|
|
In operator |
|
Query Flag Value Constraint: |
<constrain_by_value> |
Flag Value Constraint SQL: |
valueflag_cd IN ('A', 'B') |