Book a Demo

Author Topic: Foreign Key error  (Read 3454 times)

alicia

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Foreign Key error
« on: January 07, 2005, 05:58:55 am »
Hi!

I have an issue with creating a foreign keys between 2 tables. Let's call them A & B. On A I have columns Alpha, Beta, Gama and Delta. Alpha & Beta are the PK on A, and Delta is a unique identifier (I don't want to make it part of the PK). B has the following columns: Delta, Epsilon and a few others. Delta is the PK on table B.

I am trying to create a foreign keys - from B to A, on the Delta column. And I get the following error:

Destination column(s) not part of the primary key or is not unique.

Now I agree that the Delta on A is not part of PK, but it definitely is unique!

What can be the issue and how can I solve the problem? I really need this design and I really need that FK...

TIA,
Alicia Marinache,
IA Sciences.com

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Foreign Key error
« Reply #1 on: January 09, 2005, 01:52:23 pm »
I assume you mean "unique constraint" when you refer to "unique identifier".  
This was a bug for SQL Server. I suggest you download the latest release 744.

alicia

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Foreign Key error
« Reply #2 on: January 10, 2005, 07:19:14 am »
Hi!

Yes, I meant unique constraint, sorry for the confusion.

Thanks, it worked perfectly.
Alicia