Advertisement

06.20.2008 at 12:16PM PDT, ID: 23503363
[x]
Attachment Details

Alter Table fails to add FK Constraint to table.

Asked by DustinSpears in SQL Server 2005, SQL Query Syntax

Tags: Microsoft, SQL Server, 2005, TSQL, Cannot find the object "COMPANY" because it does not exist or you do not have permissions.

I'm logged in to SSMS via SQL Authentication. I can create tables, and create FK constraints at the time of table creation, but not via the Alter command on existing table. What do I need to do to make sure I have enough permission or is there a setting I need to change somewhere?Start Free Trial
1:
2:
ALTER Table COMPANY 
ADD CONSTRAINT fk_Comp_Div FOREIGN KEY (DIV_ID) REFERENCES DIVISION (DIV_ID)
 
Loading Advertisement...
 
[+][-]06.20.2008 at 12:19PM PDT, ID: 21834096

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.20.2008 at 12:27PM PDT, ID: 21834163

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.20.2008 at 12:29PM PDT, ID: 21834195

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.20.2008 at 12:41PM PDT, ID: 21834274

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.20.2008 at 12:54PM PDT, ID: 21834374

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, SQL Query Syntax
Tags: Microsoft, SQL Server, 2005, TSQL, Cannot find the object "COMPANY" because it does not exist or you do not have permissions.
Sign Up Now!
Solution Provided By: aneeshattingal
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628