Subject | RE: [IBO] TIB_DataPump |
---|---|
Author | Alan McDonald |
Post date | 2004-02-28T10:41:37Z |
> CREATE TABLE SOCI (snip
> MYCODE D_GUID /* VARCHAR(36) NOT NULL */,
> COGNOME COGNOME /* VARCHAR(30) */,
> NOME NOME /* VARCHAR(20) */,
> DA_RICHIAMARE BOOL /* CHAR(1) 1 NOT NULL */ NOT NULLOK - now where is your trigger for the PK? If you try during a pump to
> );
>
>
>
> ALTER TABLE SOCI ADD CONSTRAINT PK_SOCI PRIMARY KEY (MYCODE);
>
>
> CREATE INDEX XCOGNOMESOCI ON SOCI (COGNOME, NOME);
>
> /* Trigger: SOCI_BIU0 */
> CREATE TRIGGER SOCI_BIU0 FOR SOCI
> ACTIVE BEFORE INSERT OR UPDATE POSITION 0
> AS
> begin
> new.eta = coalesce( ( current_date - new.data_nascita ) / 365, 0 );
> end
> ^
>
>
> SET TERM ; ^
>
> That's all.
insert a null value for MYCODE the first time will work but not the second.
Is the source db definition identical?
BTW are you using reverse GUIDs? There's a UDF around which makes for GUID
indexes to be much faster since the significant end of the GUID is reversed.
If you are generating the GUIDs at the client then they may not be optimised
for Firebird indexes.
Alan