Subject Domain check constraint fails
Author Rick Debay
I found a value of '17' in a column defined with the following domain:

CREATE DOMAIN D_CUST_GRP AS
CHAR(3)
CHECK (VALUE IS NULL OR
(
/*LTRIM(RTRIM(STRLEN(VALUE))) = 3 AND*/
UPPER(VALUE) = VALUE AND
VALUE BETWEEN '001' AND 'ZZZ'))
COLLATE ISO8859_1;

Bug or badly written domain? Or both?

Rick DeBay