Hi,
Hope that someone can help me since I'm stuck here and
don't really understand why I'm getting the error.
I have two table cat and users.
create table category (
id integer default serial,
label varchar(50) UNIQUE,
commenttext long,
primary key (id)
)
create table users (
id integer default serial,
login varchar(50) NOT NULL UNIQUE,
role varchar(10) DEFAULT 'user',
deleted char(1) default 'f',
session_id char(32) DEFAULT NULL,
password char(32),
email char(50),
primary key (id)
)
Up to here no problem, but as I tried to define the
proc table I got the -7040 error message stating that
"referential constraint not allowed".
create table process (
id integer default serial,
label varchar(50),
category_id integer references category(id),
commenttext long,
owner_id integer references users(id) ,
create_time timestamp DEFAULT now(),
create_user integer references users(id) on
delete set null,
examine char(1),
primary key (id)
)
The problem seems to be on the colum create_user and
the delete rule. If I omit the delete rule then no
problem but as soon as a delete rule is given then no
way. I also tried to define the integrity through
foreign keys constraints and over an alter table but I
was not successful. Do you have any idea?
Many thanks
bye
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Jetzt ein- oder umsteigen und USB-Speicheruhr als Pr�mie sichern!
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general