Subject | Error while trying to add a primary key |
---|---|
Author | Larry Johnson |
Post date | 2008-10-31T17:28:19Z |
I have a table which has 6 records in it, each of which has a unique value
in one column. Very simply, these values are 0, 1, 2, 3, 4, 5. In
addition, the following SELECT statement returns zero rows:
SELECT AL5.MEDIATYPE_ID, Count (AL5.MEDIATYPE_ID) FROM SYSDBA.MEDIATYPE AL5
GROUP BY AL5.MEDIATYPE_ID HAVING Count (AL5.MEDIATYPE_ID)>1
However, when I execute the following SQL statement:
alter table mediatype add constraint pk_mediatype primary key (mediatype_id)
I get the following error message:
IAG [HY000] [ODBC Firebird Driver][Firebird]unsuccessful metadata update
can't format message 8:21 -- message file
C:\Hyperion\products\biplus\bin\firebird.msg not found
attempt to store duplicate value (visible to active transactions) in unique
index "RDB$INDEX_5" (-607)
How can I resolve this? TIA!
(Interestingly, if I specify sysdba.mediatype in the ALTER statement, which
worked successfully in the SELECT, I get an invalid token message when it
encounters the period. Note that I am logged on as sysdba.)
[Non-text portions of this message have been removed]
in one column. Very simply, these values are 0, 1, 2, 3, 4, 5. In
addition, the following SELECT statement returns zero rows:
SELECT AL5.MEDIATYPE_ID, Count (AL5.MEDIATYPE_ID) FROM SYSDBA.MEDIATYPE AL5
GROUP BY AL5.MEDIATYPE_ID HAVING Count (AL5.MEDIATYPE_ID)>1
However, when I execute the following SQL statement:
alter table mediatype add constraint pk_mediatype primary key (mediatype_id)
I get the following error message:
IAG [HY000] [ODBC Firebird Driver][Firebird]unsuccessful metadata update
can't format message 8:21 -- message file
C:\Hyperion\products\biplus\bin\firebird.msg not found
attempt to store duplicate value (visible to active transactions) in unique
index "RDB$INDEX_5" (-607)
How can I resolve this? TIA!
(Interestingly, if I specify sysdba.mediatype in the ALTER statement, which
worked successfully in the SELECT, I get an invalid token message when it
encounters the period. Note that I am logged on as sysdba.)
[Non-text portions of this message have been removed]