Hey there, i really want to break my pc by now

can anyone tell me how to get around this ??

I just want to update the new database here

USE NGCOLLECT
GO

INSERT INTO dbo.Cases
(
	CustId
,	Consultant
,	Bank
,	OldAccountNo
,	LastAmountReceived
,	DateReceived
,	ArrearAmount
,	VehicleMake
,	RegistrationNo
,	ChassisNo
,	FirstName
,	Surname
,	IDNumber
,	HomeTel
,	WorkTel
,	CellNo
,	Address_1
,	Address_2
,	Province
,	Code
,	OtherFirstName
,	OtherSurname
,	OtherIDNumber
,	OtherHomeTel
,	OtherWorkTel
)

SELECT
	4
,	Collector
,	'Wesbank'
,	oldAccountNumber
,	Last_Pay_Amount
,	Last_Pay_Date
,	Balance
,	Car_Description
,	Registration_Number
,	Chassis_Number
,	Name_
,	Surname
,	IDNumber
,	Tel_H
,	Tel_W
,	Tel_Cell
,	Client_Address
,	Client_Address1
,	Zone
,	Address_Code
,	Surety2_Name
,	Surety2_Surname
,	Surety2_ID_Number
,	Surety2_H_tel
,	Surety2_B_tel

FROM [TL].dbo.[Detailed_List]

I get this error :

Msg 2601, Level 14, State 1, Line 2
Cannot insert duplicate key row in object 'dbo.Cases' with unique index 'IX_Cases'.
The statement has been terminated.


Any help PLEASE !!!

ok the error was found in the accountNumber columns, thanks anyway

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.