A subquery specification is not allowed in a CONSTRAINT definition.
...
1. Try to formulate the search condition in such a way that the subquery is not necessary.
2. Try to achieve the desired effect by defining a trigger that checks the condition.