Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
spmchugh82
Starting Member
13 Posts |
Posted - 2009-02-17 : 18:20:51
|
| Hi, I am brand new to SQL Server! Looks very good though!I have tables: Pizza(Pizza(PK,FK), Description, Price)UsedIngredients(Pizza(PK), Ingredients(PK))Ingredients(Ingredient(PK, FK), Description, Price)okay, so the relationship i want looks like this:P--1-----M--UI--M-----1--II can make the foriegn keys but when I try and establish a relationship I get the error message "Both sides or a relationship must have the same number of columns"I don't understand what I'm doing wrong. Could you PLEASE help me? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-17 : 18:24:24
|
Post your code you use when trying to create the pk-fk constraint. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
spmchugh82
Starting Member
13 Posts |
Posted - 2009-02-17 : 18:30:55
|
| I'm doing it with the GUI. Following the instructions on this link http://www.functionx.com/sqlserver/Lesson14.htmAny relationship at all would make me happy at this point. I can create table1 and table2 each with one column and primary key one and foriegn key the other and then when i try to create the relationship on the foriegn key I get the same error message. "Both sides or a relationship must have the same number of columns" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-17 : 18:34:47
|
See point 8.You must have the same number of columns on left side as right side. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
spmchugh82
Starting Member
13 Posts |
Posted - 2009-02-17 : 18:41:44
|
| OKAY COOL! THANKS i just took another look.The problem was my screen I didn't see where you could select the colum on both tables. Allright, cool, thanks! |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|