i HAVE THE FOLLOWING SQL.
What i want is to insert into tableResort anything from temp_resort that isn't already in resort, based on rcode.
surely the following sql is doing that but im getting a :
Violation of PRIMARY KEY constraint 'PK_Resort'. Cannot insert duplicate key in object 'dbo.RESORT'.
INSERT INTO RESORT(RCODE, CCODE, ISLAND)
SELECT RCODE, CCODE, ISLAND FROM TEMP_RESORT T
WHERE T.RCODE NOT IN