Subject | Re: another Error |
---|---|
Author | Bernhard Doebler |
Post date | 2001-07-27T09:35:25Z |
Hi.
I meanwhile found out INTEG_95 is the PRIMARY KEY of table SCHICHT.
But how can the error occur?
Create table SCHICHT (
SCHICHTID Smallint Default 0 NOT NULL,
BEZEICHNUNG Varchar(20) NOT NULL,
Primary Key (SCHICHTID)
);
CREATE TABLE DATEN
(
NUMMER SMALLINT NOT NULL,
NAME CHAR(16) NOT NULL,
DATUM TIMESTAMP NOT NULL,
SCHICHT SMALLINT NOT NULL,
BODY_0 INTEGER NOT NULL,
BODY_1 INTEGER NOT NULL,
BODY_2 INTEGER NOT NULL,
BODY_3 INTEGER NOT NULL,
BODY_4 INTEGER NOT NULL,
BODY_5 INTEGER NOT NULL,
BODY_6 INTEGER NOT NULL,
BODY_7 INTEGER NOT NULL,
BODY_8 INTEGER NOT NULL,
BODY_9 INTEGER NOT NULL,
BODY_10 INTEGER NOT NULL,
BODY_11 INTEGER NOT NULL
);
Alter table DATEN add foreign key (SCHICHT) references SCHICHT (SCHICHTID) on update no action on delete cascade;
Best Regards
Bernhard
I meanwhile found out INTEG_95 is the PRIMARY KEY of table SCHICHT.
But how can the error occur?
Create table SCHICHT (
SCHICHTID Smallint Default 0 NOT NULL,
BEZEICHNUNG Varchar(20) NOT NULL,
Primary Key (SCHICHTID)
);
CREATE TABLE DATEN
(
NUMMER SMALLINT NOT NULL,
NAME CHAR(16) NOT NULL,
DATUM TIMESTAMP NOT NULL,
SCHICHT SMALLINT NOT NULL,
BODY_0 INTEGER NOT NULL,
BODY_1 INTEGER NOT NULL,
BODY_2 INTEGER NOT NULL,
BODY_3 INTEGER NOT NULL,
BODY_4 INTEGER NOT NULL,
BODY_5 INTEGER NOT NULL,
BODY_6 INTEGER NOT NULL,
BODY_7 INTEGER NOT NULL,
BODY_8 INTEGER NOT NULL,
BODY_9 INTEGER NOT NULL,
BODY_10 INTEGER NOT NULL,
BODY_11 INTEGER NOT NULL
);
Alter table DATEN add foreign key (SCHICHT) references SCHICHT (SCHICHTID) on update no action on delete cascade;
Best Regards
Bernhard
----- Original Message -----
From: "Bernhard Doebler" <programmer@...>
To: <ib-support@yahoogroups.com>
Sent: Friday, July 27, 2001 11:16 AM
Subject: another Error
my IBConsole says:
Violation of FOREIGN KEY constraint "INTEG_95" on table "SCHICHT"
Statement: Alter table DATEN add foreign key (SCHICHT) references SCHICHT (SCHICHTID) on update no action on delete cascade