Subject RE: [firebird-support] Cannot create simple table
Author Leyne, Sean
> Trying to create a simple table and receive this error:
>
> unsuccessful metadata update
> cannot create index PK_CUR_CASE_INV_NON_JUD_CNT
> while executing:
> ALTER TABLE CUR_CASE_INV_NON_JUD_CNTY ADD CONSTRAINT
> FK_CUR_CASE_INV_RPT3
>   FOREIGN KEY (REPORT_ID) REFERENCES CUR_CASE_INV_RPT
>   (REPORT_ID)
>   ON DELETE CASCADE
>   ON UPDATE NO ACTION
>
>
> Here is the DDL:
>
> CREATE TABLE CUR_CASE_INV_NON_JUD_CNTY
> (
>   REPORT_ID                  INTEGER         NOT NULL,
>   FILING_COUNTY              VARCHAR(    54) NOT NULL COLLATE NONE,
>   NON_JUD_COUNT              INTEGER         NOT NULL,
>   NON_JUD_AMT                NUMERIC( 15, 2) NOT NULL,
> CONSTRAINT PK_CUR_CASE_INV_NON_JUD_CNT PRIMARY KEY
> (REPORT_ID, FILING_COUNTY)
> );
> COMMENT ON TABLE CUR_CASE_INV_NON_JUD_CNTY IS '07.19.16 Stores
> the filing counties and non judgment data for use with the current case
> inventory stats report.';
> ALTER TABLE CUR_CASE_INV_NON_JUD_CNTY ADD CONSTRAINT
> FK_CUR_CASE_INV_RPT3
>   FOREIGN KEY (REPORT_ID) REFERENCES CUR_CASE_INV_RPT
>   (REPORT_ID)
>   ON DELETE CASCADE
>   ON UPDATE NO ACTION
> ;
>
> Any ideas?

What tool are you using to execute the DDL?


Sean