Subject | RE: [firebird-support] RE: Database update problem |
---|---|
Author | Thomas Steinmaurer |
Post date | 2004-09-23T10:41:24Z |
> Script:COMMIT; <---- missing
> SET AUTODDL ON;
> ALTER TABLE CORRESP add COL Varchar(35) NOT NULL;
> update corresp set col='';Do a commit here as well.
> update corresp set cref='' where cref is null;
> update corresp set col=cref;
> alter table corresp drop cref;Again, COMMIT DDL changes, before using them in a DML
> alter table corresp add CREF Varchar(35) NOT NULL;
statement.
> update corresp set cref=col;So, the statement which creates the primary key constraint
> commit;
> alter table corresp drop col;
> alter table corresp drop CONSTRAINT CORRESP_PK;
> <--------------suspected line
> commit;
> alter table corresp ADD CONSTRAINT CORRESP_PK PRIMARY KEY
> (NAME,ACCOUNT,SUBACCOUNT,CREF);
fails?
Are you sure that all fields are declared as NOT NULL?
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com