Problems with creating Relationship


Author
Message
Ulrik Mueller
Ulrik Mueller
StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)StrataFrame Beginner (18 reputation)
Group: Forum Members
Posts: 18, Visits: 59
In my current startup project on StrataFrame - i'm trying out with something very simple, but i'm getting stuck on creating a foreign key relationship between two tables.

I keep getting "There is no primary or candidate keys in the referenced table 'customer' that match the referencing column list in the forwign key 'fk_co_zip'"

BO1:  Customer - cu_number (PK), cu_name, cu_zip_number

BO2:  Zipcodes - zip_number (PK), zip_text

I'm trying to make a foreign key between cu_zip and zip_number.

I'm running on MS SQL 2005 Express Edition.

Hope that some of you can come up with the gold answer (i'm sure it is stragiht forward and simple)

Best regards

Ulrik Müller

Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Ulrik,



Are you deploying data also? Or is there existing data? My first guess would be that you have existing data that violates the FK. If there is existing data that currently violates the FK, you'd likely need to use a pre-script to fix this. Then the FK could be deployed with no problem.
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, you are welcome to post your PKG file so I can see the error you are facing so that we aren't missing anything.  But Greg had a valid question as well.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search