• Curious how adding records to a table would be any different than creating a single stored procedure to add extended properties? I used Michael Coles' T-SQL Tuesday post and rolled my own sp for our reporting team to execute multiple times for each parameter I feed in, like so:CREATE PROCEDURE [ExtProps].[spjc_insertStandardExtendedProperties] (@schema VARCHAR(25),

    @title VARCHAR(255),

    @author VARCHAR(255),

    @description VARCHAR(255),

    @businessNeed VARCHAR(255),

    @knownFlaws VARCHAR(255),

    @revisionHistory VARCHAR(255))

    AS

    BEGIN

    DECLARE @fullObjectName VARCHAR(255)

    SET @fullObjectName = @schema+'.'+@title

    EXECUTE ExtProps.PropInsert @Object_Name = @fullObjectName, -- sysname

    @Property_Name = 'Title', -- sysname

    @Property_Value = @title -- sql_variant

    EXECUTE ExtProps.PropInsert @Object_Name = @fullObjectName, -- sysname

    @Property_Name = 'Author', -- sysname

    @Property_Value = @author -- sql_variant

    EXECUTE ExtProps.PropInsert @Object_Name = @fullObjectName, -- sysname

    @Property_Name = 'Description', -- sysname

    @Property_Value = @description -- sql_variant

    EXECUTE ExtProps.PropInsert @Object_Name = @fullObjectName, -- sysname

    @Property_Name = 'Business Need', -- sysname

    @Property_Value = @businessNeed -- sql_variant

    EXECUTE ExtProps.PropInsert @Object_Name = @fullObjectName, -- sysname

    @Property_Name = 'Known flaws', -- sysname

    @Property_Value = @knownFlaws -- sql_variant

    EXECUTE ExtProps.PropInsert @Object_Name = @fullObjectName, -- sysname

    @Property_Name = 'Revision History', -- sysname

    @Property_Value = @revisionHistory -- sql_variant

    END

    Then, all I need to do is execute the one sp with the proper parameter values and I'm done. Created reports that search extended properties for whatever keyword you feed in, so we don't have to recreate the wheel if someone has already created a report that does what we're looking for. Seems just about as simple as you can get, self-documenting.

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."