• ben.brugman (9/3/2015)


    Thanks Scott,

    More elegant, more compact and it did uncover a mistake in my solution.

    (My parent_column was not correct, I had not noticed that yet.).

    Thanks,

    Ben

    Edit:

    Second check,

    , COL_NAME(parent_object_id, parent_column_id) as Parent_column

    Does appear twice in your solution, is this correct ?

    I think the second occurence of this line should read:

    , COL_NAME(referenced_object_id, referenced_column_id) as Parent_column

    Still thanks,

    Ben

    Sorry, quite right, a copy/paste where I didn't finish editing afterward:blush:

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.