rsmuckles
asked on
adding descriptions to columns in MS SQL Server 2005 with sp_addextendedproperty
Greetings,
I have a spreadsheet with several hundred tables and descriptions. I have been asked to use sp_addextendedproperty to populate the metadata with these descriptions. I have found the following suggested format but am unable to get it to work.
I've formatted my spreadsheet so that it builds a script like the one below, but when I execute a line it reports a syntax error on line 1.
The template is first in the code below, the second part is my actual code.
I have a spreadsheet with several hundred tables and descriptions. I have been asked to use sp_addextendedproperty to populate the metadata with these descriptions. I have found the following suggested format but am unable to get it to work.
I've formatted my spreadsheet so that it builds a script like the one below, but when I execute a line it reports a syntax error on line 1.
The template is first in the code below, the second part is my actual code.
USE database;
EXEC sp_addextendedproperty
'MS_Description',
'here is a nice comment about the dbo.table table',
'user', dbo,
'table', dbo.table
---------------------------------------------
USE BF_OPS_DM;
EXEC sp_addextendedproperty 'MS_Description',
'Addon table for previous version of FairQa',
'jcorey',
dbo,
'BF_OPS_DM.dbo.Addons',
dbo.BF_OPS_DM.dbo.Addons
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks again, I appreciate your help
ASKER
Also, you misunderstood the template references 'user' and 'table'. These as literals, and are telling the sp what the type is of the next parameter. You can't substitute your values for them.
</quote>
ha, this is not surprising . . .
the code you posted is what I'm looking for, thanks for your help.