Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Populate sql table field descriptions programatically Expand / Collapse
Posted Friday, March 15, 2013 6:49 AM


Group: General Forum Members
Last Login: Wednesday, January 20, 2016 9:25 AM
Points: 15, Visits: 104
I am trying to update my sql table field descriptions programatically, but I am getting an error.
use NCOS

EXEC sp_updateextendedproperty
@name = N'MS_Description', @value = 'Your description',
@level0type = N'Schema', @level0name = 'NCOS',
@level1type = N'Table', @level1name = 'NCOS_Data',
@level2type = N'Column', @level2name = 'NC_Prospect_Name';


Server: Msg 15600, Level 15, State 1, Procedure sp_updateextendedproperty, Line 42
An invalid parameter or option was specified for procedure 'sp_updateextendedproperty'.
Post #1431508
Posted Friday, March 15, 2013 2:32 PM


Group: General Forum Members
Last Login: Monday, August 15, 2016 6:50 AM
Points: 2,670, Visits: 5,953
I cannot test this at the moment, but I think..

You are specifying the database name NCOS as the Schema name. It knows the database name already, so just replace the 'NCOS' with 'dbo' or whatever is appropriate for the schema name.

Mike John

Post #1431757
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse