Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relationships in Sql Server 2008

Status
Not open for further replies.

neronikita

Technical User
Feb 20, 2002
159
US
Hello,

I am just starting to use 2008 for the first time. I have developed databases years ago, but it was in 2000. I'm trying to create a relationship betwee two tables in the same database and it's not giving me an option when I click on the relationships button. It says I should be able to choose the two tables to link, but instead it is immediately putting another copy of the table I'm working on in the list, and it never gives me an option to compare two tables to link the fields. Does this sound familiar to anyone? I can't figure out if I'm doing something wrong (although I followed the steps from a 2008 book) or if there is a bug in the program. Is there anything I should be verifying to make sure it's going to work?


in case it helps, the two tables are Employee and EmployeeType and I'm trying to link the field TypeID in the two tables.

Thanks,

Di
 
Which table are you editing the Employee or EmployeeType table?

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
I think you need to do this:

1. Click on the Relationships icon
2. Click Add on the popup. This will automatically create a relationship (something like FK_***). The definition of the relationship will be sort of undefined and within the same table (similar to what you are mentioning)
3. On the right side of the popup you would see "Tables and Column Specification". Expand that
4. Click on the button with ...
5. This would open up another popup window where you would be able to specify your relationship correctly

Hope this is what you are looking for!
 
Snitin78,

Thanks! That is exactly what I was looking for!

Thanks again,

Di
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top