SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

View results into string

View results into string

Orlando Colamatteo
Orlando Colamatteo
SSC Guru
SSC Guru (105K reputation)SSC Guru (105K reputation)SSC Guru (105K reputation)SSC Guru (105K reputation)SSC Guru (105K reputation)SSC Guru (105K reputation)SSC Guru (105K reputation)SSC Guru (105K reputation)

Group: General Forum Members
Points: 105182 Visits: 14506
jmceuin (3/7/2013)
Sorry missed that. And I did more tinkering and just added and additional GROUP BY POPRCTNM to the very end of the statement rather than in the middle and it eliminated the duplicates. The error comes up but still processes anyway. Odd. Anyway. Otherwise, per rules if I don't have to install anything, I don't have to go through a bunch of change control nonsense. Adding a "view" to the database has been ruled as a non-issue for change control because it is not the same as changing a table or data nor installing software. Anyway...

Adding dbo.GROUP_CONCAT is not 'installing' anything per se. It's just another database object, same as how a VIEW would be considered, a SQLCLR Aggregate Function to be exact. However, using dbo.GROUP_CONCAT will require enabling SQLCLR on the instance in case it is not already enabled, so in that sense it may trip up your change control process since that requires a server option change.

Is there a difference in the performance or load that one method places against the database vs the other?

The SQLCLR performs slightly better in some cases than the XML method, and the XML method performs slightly better in other cases. For general discussion they are comparable on performance. It is all presented on the CodePlex site under documentation.

There are no special teachers of virtue, because virtue is taught by the whole community. --Plato


You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum