This content has been marked as final. Show 4 replies
There could be many. Most common cause being ... there are entries that are not unique.
any possible reason why?
If the counts differ, then yep can't put a unique constraint. But nulls don't "count", they should be a non-issue.
select count(*) from <table>; select count(*) from (select distinct <unique col1>[[,<unique col2>]...<unique colN>] from <table>);
I was able to load 3 identical copies of the same file (with different names of cause) with Reference as UK, no complains. Why?
Can you provide what example you are referring? I ask because
so a test case sample that reproduces what you are seeing would be good.
Connected to Oracle Database 11g Enterprise Edition Release 18.104.22.168.0 SQL> create table purchase_order(seq number(4), xml_col xmltype); Table created SQL> SQL> ALTER TABLE purchase_order 2 ADD CONSTRAINT reference_is_unique 3 UNIQUE (xml_col); ALTER TABLE purchase_order ADD CONSTRAINT reference_is_unique UNIQUE (xml_col) ORA-02329: column of datatype Opaque Type cannot be unique or a primary key
Thanks for looking into it, I did not define names properly.