"Violation of PRIMARY KEY constraint 'PK_tblCustomsTariffTreeMap'. Cannot insert duplicate key in object 'dbo.tblCustomsTariffCodeTreeMap'."
However, the record I am inserting does not represent a duplicate on the primary key.
To ensure this I ran the following and still got the error:
Expand|Select|Wrap|Line Numbers
- update tblCustomsTariffCodeTreeMap
- set TariffCodeID = (SELECT max(tariffcodeid)+1 from tblCustomsTariffCodeTreeMap)
- where TreeNodeID = 955
The primary key is defined as follows:
- index_name : PK_tblCustomsTariffTreeMap
index_description : clustered, unique, primary key located on PRIMARY
index_keys : TariffCodeID, TreeNodeID
Any suggestions?