Hello,
Sometimes, when multiple clients are trying to insert records into the same table simultaneosly, some clients get error (SQLCODE=-193)
Primary key for table 'TableX' is not unique: Primary key value ('28')
Clients are executing many statements like:
INSERT INTO TableX ([PrimaryKeyColumn_Integer], [OtherColumn1], [OtherColumn2]) ON EXISTING UPDATE VALUES (28, 'Y', 'N');
Error happens on SQL Anywhere 16 EBF 2207 Windows 64bit. Error never happened on EBF 2127 and some older EBFs, but it might be just lucky case.
My question: why does INSERT with "ON EXISTING UPDATE" not detect that record already exists? Does it depend on isolatation level or something else?