Subject RE: [IBO] Scripting problem
Author Riho-Rene Ellermaa
What is wrong with this script (in Interbase 6)

SET AUTODDL ON;

ALTER TABLE CORRESP DROP CONSTRAINT CORRESP_PK;
commit;
ALTER TABLE CORRESP DROP SUBACCOUNT;
ALTER TABLE CORRESP ADD SUBACCOUNT VARCHAR(16) NOT NULL;
commit;
update corresp set subaccount='' where subaccount is null;
commit;
ALTER TABLE CORRESP
ADD CONSTRAINT CORRESP_PK PRIMARY KEY (NAME,ACCOUNT,SUBACCOUNT);
// $$ ******** ERROR ************* $$
//FAILED - attempt to store duplicate value (visible to active transactions) in unique index "RDB$PRIMARY31"
//null segment of UNIQUE KEY
//
commit;



Riho-Rene Ellermaa
senior programmer
Hansabank





[Non-text portions of this message have been removed]