Forum Discussion

sunjin122's avatar
sunjin122
Helper I
10 years ago
Solved

How to create relationship between two tables?

 

Can anyone help me with this situation? As the screenshot shown below, how can i fix this problem and create a relationship between the two tables? Thanks ahead!

 

 

  • Anonymous's avatar
    Anonymous
    10 years ago

    sunjin122 The "one" side of the relationship needs to have only 1 unique value in the column you are using.

    example: Relationship on Client between table "Many" and "One"

      Works  
    Many  One 
    ClientProduct Client 
    1A 1Name 1
    1A 2Name 2
    1S 3Name 3
    2S 4Name 4
    2S 5Name 5
         
         
      Will Not Work  
    Many  One 
    ClientProduct Client 
    1A 1Name 1
    1A 2Name 2
    1S 3Name 3
    2S 4Name 4
    2S 4Name 4

     

5 Replies

  • KGrice's avatar
    KGrice
    Memorable Member

    From the error message, neither table has a column of unique values to create your relationship, at least not on the column you're using to relate them. What kind of tables are you trying to relate? I only ask because it does not always make sense to try to create this relationship. However, if you have a real need for a many-to-many relationship, this article gives an in-depth description of how to make this happen using a bridge table.

  • jahida's avatar
    jahida
    Impactful Individual

    Need more context, what do the tables contain?

  • Anonymous's avatar
    Anonymous
    Not applicable

    sunjin122 The "one" side of the relationship needs to have only 1 unique value in the column you are using.

    example: Relationship on Client between table "Many" and "One"

      Works  
    Many  One 
    ClientProduct Client 
    1A 1Name 1
    1A 2Name 2
    1S 3Name 3
    2S 4Name 4
    2S 5Name 5
         
         
      Will Not Work  
    Many  One 
    ClientProduct Client 
    1A 1Name 1
    1A 2Name 2
    1S 3Name 3
    2S 4Name 4
    2S 4Name 4