Is the code for the view in the "// Join Criteria" section of this article all messed up, or is it just me? There seem to be lots of strange angled quotes, which presumably should all be normal quotes. There are single long hyphens instead of two normal hyphens to indicate comments. The three REPLACE functions seem to be wrong, and don't even have enough parameters supplied, maybe they should be something like this:
[font="Courier New"],JoinColumns = REPLACE(LEFT(C.JoinColumns, Len(C.JoinColumns) - 4), '<Object_ID>' + cast(C.object_id AS VARCHAR(16)) + '</Object_ID>', '')[/font]
or maybe just:
[font="Courier New"], JoinColumns = Left(C.JoinColumns,Len(C.JoinColumns)-4)[/font]
if we remove [font="Courier New"]C2.Object_ID[/font] from the three selects near the bottom of the code?
Can somebody correct the original article so it works just by copying and pasting it? I'm not confident about how it ought to work so I'm not sure if I'm fixing it correctly. Thanks.