im trying to reject all inputs not in the format "03 xxxx xxxx" so i created a table like
create table records
(
....
num varchar(255) NOT NULL,
...
CONSTRAINT num_check CHECK (num like '03 [0-9]{4} [0-9]{4}')
)
which should (i think?) accept for example "03 1234 1234". but if i try to add this via sql manager i get an error with the message: "the INSERT statement conflicted with the CHECK constraint "num_check" "
at first i thought my Regex was off but ive tried it in a few other places and it accepts the example above. any ideas?