dbTalk Databases Forums  

Can not create relationship; SQL server 2008 Express

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Can not create relationship; SQL server 2008 Express in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jpBless
 
Posts: n/a

Default Can not create relationship; SQL server 2008 Express - 03-16-2009 , 09:14 AM






I am using the management studio tool that came with SQL server 2008 Express
Edition. Problem is the relationship button is greyed out on the toolbar.
How do I create relationship (between tables) in SQL 2008 Express... also
what do I need to set to enable the (greyed out) relationship button?

Thanks in advance



Reply With Quote
  #2  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Can not create relationship; SQL server 2008 Express - 03-16-2009 , 09:54 AM






This is one reason why it's good to know the syntax instead of relying on a
graphical tool that might not always work (never mind that you can't store
those pointies and clickies in source control).

CREATE TABLE dbo.Customers(CustomerID INT PRIMARY KEY);

CREATE TABLE dbo.Orders(OrderID INT PRIMARY KEY,
CustomerID INT FOREIGN KEY REFERENCES dbo.Customers(CustomerID));





On 3/16/09 11:14 AM, in article ummT2nkpJHA.5100 (AT) TK2MSFTNGP03 (DOT) phx.gbl,
"jpBless" <jp3blessNoSpam (AT) hotmail (DOT) com> wrote:

Quote:
I am using the management studio tool that came with SQL server 2008 Express
Edition. Problem is the relationship button is greyed out on the toolbar.
How do I create relationship (between tables) in SQL 2008 Express... also
what do I need to set to enable the (greyed out) relationship button?

Thanks in advance




Reply With Quote
  #3  
Old   
jpBless
 
Posts: n/a

Default Re: Can not create relationship; SQL server 2008 Express - 03-16-2009 , 01:29 PM



Thanks for responding... I am trying to adapt the sample code to create
relationshiption between tables. I was hoping there is a GUI tool I could
use use to drag-and-drop. Thanks for the help.



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote

Quote:
This is one reason why it's good to know the syntax instead of relying on
a
graphical tool that might not always work (never mind that you can't store
those pointies and clickies in source control).

CREATE TABLE dbo.Customers(CustomerID INT PRIMARY KEY);

CREATE TABLE dbo.Orders(OrderID INT PRIMARY KEY,
CustomerID INT FOREIGN KEY REFERENCES dbo.Customers(CustomerID));





On 3/16/09 11:14 AM, in article ummT2nkpJHA.5100 (AT) TK2MSFTNGP03 (DOT) phx.gbl,
"jpBless" <jp3blessNoSpam (AT) hotmail (DOT) com> wrote:

I am using the management studio tool that came with SQL server 2008
Express
Edition. Problem is the relationship button is greyed out on the toolbar.
How do I create relationship (between tables) in SQL 2008 Express... also
what do I need to set to enable the (greyed out) relationship button?

Thanks in advance






Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Can not create relationship; SQL server 2008 Express - 03-16-2009 , 05:22 PM



jpBless (jp3blessNoSpam (AT) hotmail (DOT) com) writes:
Quote:
Thanks for responding... I am trying to adapt the sample code to create
relationshiption between tables. I was hoping there is a GUI tool I could
use use to drag-and-drop. Thanks for the help.
There is a GUI tool, but it's questionable that it is less work
than learning to type the commands.

And the table designer that comes with Mgmt Studio is quite crappy. There
are some horrible bugs in it when it comes to modifying existing tables.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #5  
Old   
Itamar
 
Posts: n/a

Default Re: Can not create relationship; SQL server 2008 Express - 03-18-2009 , 08:10 AM



On Mar 16, 5:14*pm, "jpBless" <jp3blessNoS... (AT) hotmail (DOT) com> wrote:
Quote:
I am using the management studio tool that came with SQL server 2008 Express
Edition. Problem is the relationship button is greyed out on the toolbar.
How do I create relationship (between tables) in SQL 2008 Express... also
what do I need to set to enable the (greyed out) relationship button?

Thanks in advance
You can use a 3rd party tool, like this query tool :
http://nobhillsoft.com/MarieAlix.aspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.