here is my table
Party1 party2 DELFlag
JON NYC 0
JON NYC1 0
SAM NYC 0
SAM NYC1 0
TOM NYC1 0
GIT NYC1 0
No I need to change all NYC1 to NYC , but I get primary key error As JON is already related to JON->NYC in this case I need to make the flag to 1
To be more specific JON->NYC1 must be JON-NYC1-1 and TOM-NYC1-0 must change to TOM-NYC-0 as tom does not have any records
My table update must look like
Party1 party2 DELFlag
JON NYC 0
JON NYC1 1
SAM NYC 0
SAM NYC1 1
TOM NYC 0
GIT NYC 0