Data Partition Constraint with "OR" return error message "AHD05800:Bad where clause."

Document ID : KB000047560
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:
- Constraint with AND clause works fine
group.last_name != 'HRIS' and group.last_name != 'GRP1'

- Constraint with OR return error message
group is null or ( group.last_name != 'HRIS' and group.last_name != 'GRP1')
AHD05800:Bad where clause. AHD03106:Where clause results in a Cartesian product


Answer: 
We could convert the OR to AND as below.
The constraint would be
not (not (group is null) and not(group.last_name != 'HRIS' and group.last_name != 'GRP1') )

1.png

2.png

3.png