I have a dilemma……the constraint was disable somehow in my table of about 900,000 records which allowed the insertion on duplicate primary keys as well as duplicate records. I’ve managed to get rid of the duplicate records, but I haven’t quite figured out how to update the primary key and version number. I’ve tried the following but UPDATE TABLE SET PM_PM_KEY=(MAX(PM_KEY)+1), PM_VERNO=(MAX(PM_VERNO)+1) WHERE TBLDATE= MAX(TBLDATE) ORDER BY TBLDATE ASC GROUP BY PCN;
The query is failing with Error at Command Line:2 Column:19 Error report: SQL Error: ORA-00934: group function is not allowed here 00934. 00000 - "group function is not allowed here" *Cause: *Action: