View previous topic :: View next topic
|
Author |
Message |
sqljunkie
New User
Joined: 03 May 2006 Posts: 2
|
|
|
|
Hi,
I have table1,table2,table3,table4
table1 i created with account number as primary key: worked fine
table 2 i created with account_number and account_ind as primary key and references table1.account number as foreign key : worked fine
now while creating table 3 -my primary key is accout_ number and table_4 ind and foreign key should be table2.account number and table2.account_ind
-this fails saying
DSNT408I SQLCODE = -538, ERROR: FOREIGN KEY TABCFK DOES NOT CONFORM TO THE
DESCRIPTION OF A PARENT KEY OF TABLE TABLE2
Can someone tell me what iam doing wrong. |
|
Back to top |
|
|
cheryala
New User
Joined: 20 Mar 2006 Posts: 46
|
|
|
|
Hi
What I believe is you can't create a foriegn key on another foreign key..
Instead of pointing to table2.account_number ...try using table1.account_number ...
Cheers,
Cheryala |
|
Back to top |
|
|
perez_a
New User
Joined: 02 Feb 2006 Posts: 25 Location: Italy
|
|
|
|
Hi sqljunkie,
have u cecked that
accout_ number table_4 ind are some type of
account_number account_ind ?
If yes, please write the code that u have used for more detail.
Have a nice day, Alex |
|
Back to top |
|
|
|