All, We have a User where there is an Access Application installed. Every Day he enters some Account Numbers in it. This Access application is hooked to SQL Server 2008 which updates a table in SQL Server. Now last 2 weeks user had some Connection Issues
so he did not enter any Account Numbers in the Access application instead he just noted them on a Excel sheet.
Now I did not want him to insert manually, so I took that Excel sheet, loaded account numbers in a Temp table and tried to insert all the Missing Account Numbers in the Main table. But it failed with the following error: Note: Account_No has a Unique Non
Clustered Index on it and it is not a Primary key also. How can I insert them? (There are no duplicate account numbers as well that I am trying to insert its all Unique Accout Numbers)
Msg 2601, Level 14, State 1, Line 1
Cannot insert duplicate key row in object 'dbo.Table_Name' with unique index 'Accoutn_No'.
The statement has been terminated.
View Complete Post