January 16, 2008 at 2:38 am
Hello, guys how are you doing?:unsure:
My database name is " Otolaryngology" and the table name is " AppDetail". and the problem is, when I try to set the primary key in the APPDetail design tables, it gave me error.
the error says -
'AppDetail' table
- Unable to create index 'PK_AppDetail'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID 1. Most significant primary key is '25250'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not create constraint. See previous errors.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
Please guys help me?
thanks
January 16, 2008 at 2:45 am
A primary key is the (usually sole) unique identifier for your table rows. By definition it cannot have any duplicates. The error message is indicating that you have a duplicate key. You should delete duplicate rows from your table before creating the key.
More to the point, perhaps you should choose additional columns for your primary key so that the data in the columns chosen can uniquely identify each row in the table.
January 16, 2008 at 7:36 am
Hello, Ian yates how are you doing?
let me explain to you in detail. this problem happens during updating tables. after they made changes in database tables and designs, we update the database tables and designs of the customer ( permanent data). this error shows when i was exporting the database from permanent data to temporary data then all tables are exported successfully, except this "AppDetail" table. what i mean is in order to export between two tables, first you should adjust any change in design tables.
* take a look in design Table 'AppDetail' in Ototemporary
- AppID, FileNo, and BranchID have primary keys. so, if you want to export from permanent to temporary data, you should adjust the Designs. There fore, this error shows during adjusting the two design tables. but there is no problem with tables and no duplicate tables, this is it.
I hope you will get it or if it is not clear ask me
thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply