Reported By: Piotr Front Reported On: 12/14/2011 For: Version 2.06 Build 2
# 3523REPAIR TABLE Statement Not Correcting Issues with Constraints We have one table which cannot be optimized due to the following error:
ElevateDB Error #1004 An error occurred with the statement at line 4 and column 22 (The primary key constraint ID for the table AlertsGenerated has been violated (NULL values are not allowed in a primary key))
As you see, repair do nothing in this case and working solution is to execute query "DELETE FROM AlertsGenerated WHERE ID IS NULL".
SCRIPT
BEGIN
EXECUTE IMMEDIATE 'REPAIR TABLE "AlertsGenerated"';
EXECUTE IMMEDIATE 'OPTIMIZE TABLE "AlertsGenerated"';
END
CommentsThe repair now removes any rows that cause a violation of the constraints during a repair.
ResolutionFixed Problem on 12/16/2011 in version 2.07 build 1