Subject | Unique constraint causes insert to fail with 'conversion error from string " "' |
---|---|
Author | Rick Debay |
Post date | 2012-11-09T21:22:22Z |
I have a table T (PBM_CLAIM BIGINT, CLAIM_SRC SMALLINT, ...) with the
unique constraint:
ALTER TABLE RELAY_CLAIM ADD CONSTRAINT U_RELAY_CLAIM_SRC UNIQUE
(PBM_CLAIM,CLAIM_SRC);
If I try to insert a row with (NULL, NULL, ...) when this constraint
exists, I get the error
ISC ERROR CODE:335544334
ISC ERROR MESSAGE:
conversion error from string " "
I drop the constraint, and the insert works.
I'm at a loss to understand what's going on, as adding the constraint to
an existing table works and there are thousands of rows where the tuple
is (NULL,NULL).
A simple test table with only a few test rows, these two columns, and
the unique constraint works fine.
Does anyone have any ideas or experience anything like this?
unique constraint:
ALTER TABLE RELAY_CLAIM ADD CONSTRAINT U_RELAY_CLAIM_SRC UNIQUE
(PBM_CLAIM,CLAIM_SRC);
If I try to insert a row with (NULL, NULL, ...) when this constraint
exists, I get the error
ISC ERROR CODE:335544334
ISC ERROR MESSAGE:
conversion error from string " "
I drop the constraint, and the insert works.
I'm at a loss to understand what's going on, as adding the constraint to
an existing table works and there are thousands of rows where the tuple
is (NULL,NULL).
A simple test table with only a few test rows, these two columns, and
the unique constraint works fine.
Does anyone have any ideas or experience anything like this?