panJames
asked on
Relationship question
Hello experts!
I have a table of users:
USERS
id
name
surname
Users are allowed to sell things to each other.
I need a table to record sales data between users.
SALES
id
buyerFK foreign key to USERS.id
sellerFK foreign key to USERS.id
price
problem is that my database which is SQL Server express does not allow me to have two foreign keys pointing to the same table (USERS).
How can I solve this problem please?
Thank you
panJames
I have a table of users:
USERS
id
name
surname
Users are allowed to sell things to each other.
I need a table to record sales data between users.
SALES
id
buyerFK foreign key to USERS.id
sellerFK foreign key to USERS.id
price
problem is that my database which is SQL Server express does not allow me to have two foreign keys pointing to the same table (USERS).
How can I solve this problem please?
Thank you
panJames
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using WebMatrix, it allows me to create tables and relationships in its own tool.
Are you guys saying that it is possible to have such relations?
Maybe it is some king of limitation of webmatrix?
panJames
Are you guys saying that it is possible to have such relations?
Maybe it is some king of limitation of webmatrix?
panJames
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Stupid me: all I had to do was to change the name.
THX!
THX!
These have been know to cause problems in SQL Server Express for this type of relationship.
As indicated by Thomasian, would need to see the error to understand further.