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) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".