Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drop column failed
Message
 
 
To
09/03/2011 15:13:10
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01503074
Message ID:
01503087
Views:
41
>>Check sp_depends system stored procedure to find out where this field is used.
>
>This:
>
>
>EXEC sp_depends @objname = N'MyTable.HomePhone'
>
>
>gives:
>
>"Msg 15009, Level 16, State 1, Procedure sp_depends, Line 25
>The object 'MyTable.HomePhone' does not exist in database 'MyDatabase' or is invalid for this operation."
>
>The field does exist. So, it would then be related to the other side of the sentence in regards to being invalid for this operation.
>
>Any idea on what I get this reaction?

Actually, you can not use sp_depends

The object can be a table, view, stored procedure, user-defined function, or trigger. object_name is nvarchar(776), with no default.

Try
select Table_Name from INFORMATION_SCHEMA.Columns where Column_Name = 'HomePhone'
...to check how many tables use this field.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform