Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When using the approach of creating composite keys (eg. %LinkKey in your example) you need to remove the original fields from your data model.
For example:
Thanks for your answer,
I think I have a mistake in the last part of the script i have provided.
I actually already have in my script:
Ah, sorry - I missed that.
Then I'd say your problem is this: drop fields fld_a , fld_b , fld_c from tbl_3;
You still have those fields in tbl_1 AND tbl_2.
Start with fixing that.
Thanka again for your reply.
I think i took care of that as well.
Please see in the script i last provided:
drop fields fld_a , fld_b , fld_c, fld_d, fld_e from tbl_1, tbl_2;
What probably remains now is that you have %LinkKey and %LinkKey_2 in both tbl_1 AND in tbl_2. That gives you a synthetic key.
(Another thing: perhaps you already know but you don't need to specify "from" in the drop fields statement. If you don't specify tables, the fields will be dropped from all tables.)
Right. How can i solve this?
It's difficult to give a general answer to that. Just like you eliminated synthetic keys between fld_a, fld_b etc, you need to make sure that your new compound keys don't result in synthetic keys. Two tables may only be linked by one field - if two or more fields with the same name exists in multiple tables, a synthetic key is the result.
You need to alter your data model so that it is avoided, and how you should do that very much depends on the data you have.