Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop column failed
Message
 
 
À
09/03/2011 15:13:10
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01503074
Message ID:
01503087
Vues:
40
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform