October 13, 2014 at 9:01 am
Based on this, which is an interesting problem: http://www.sqlservercentral.com/Forums/Topic1625170-2799-1.aspx
Show how to move rows to a delimited string and then summarize.
October 13, 2014 at 9:16 am
Steve Jones - SSC Editor (10/13/2014)
Based on this, which is an interesting problem: http://www.sqlservercentral.com/Forums/Topic1625170-2799-1.aspxShow how to move rows to a delimited string and then summarize.
What would you suggest as a title for a high Google hit rate on something like this?
If nothing goes haywire at work, I believe I can have a Spackle article on this tonight.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 13, 2014 at 9:21 am
Not sure. I wasn't sure how to frame this, but I've seen the concatenation question regularly, and sometimes with some aggregation or summary (like counting responses and listing them).
Denormalize responses to a poll with T-SQL?
Summarizing and Displaying All Values in One Row?
Another way to Pivot data in T-SQL?
I'm open to suggestions.
October 13, 2014 at 9:28 am
Steve Jones - SSC Editor (10/13/2014)
Not sure. I wasn't sure how to frame this, but I've seen the concatenation question regularly, and sometimes with some aggregation or summary (like counting responses and listing them).Denormalize responses to a poll with T-SQL?
Summarizing and Displaying All Values in One Row?
Another way to Pivot data in T-SQL?
I'm open to suggestions.
K. I'll think of something. You're right... it is a common question. Wayne Sheffield's article on creating CSV's is a great one but I can see the need for something that will cover things like those in the URL you cited.
p.s. I can't speak for anyone else but it seems like the response time even just to view and article have gotten pretty slow. Clicking on "Quote" to respond to a thread seems to take a huge amount of time.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 14, 2014 at 5:08 am
I started working on the article last night but didn't finish it. It's coming.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 14, 2014 at 5:16 am
I think the article will definitely be an interesting one. Also, the page load time has increased significantly for me as well.
January 22, 2015 at 11:18 am
bump
January 22, 2015 at 1:51 pm
Steve Jones - SSC Editor (1/22/2015)
bump
<HeadDesk> My apologies. Major side tracks and I forgot about it. I'll resurrect it this weekend.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 14, 2016 at 2:23 pm
Jeff Moden (1/22/2015)
Steve Jones - SSC Editor (1/22/2015)
bump<HeadDesk> My apologies. Major side tracks and I forgot about it. I'll resurrect it this weekend.
Crud. My apologies. Totally lost track of this. I need to see if I can even find what I was working on.
(Note to self: Nested Concatenation)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 4, 2017 at 10:19 am
Jeff Moden - Sunday, February 14, 2016 2:23 PMJeff Moden (1/22/2015)
Steve Jones - SSC Editor (1/22/2015)
bump<HeadDesk> My apologies. Major side tracks and I forgot about it. I'll resurrect it this weekend.
Crud. My apologies. Totally lost track of this. I need to see if I can even find what I was working on.(Note to self: Nested Concatenation)
Jeez... My apologies... I've really dropped the ball for articles.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 4, 2017 at 11:27 am
No need to apologize. I know how busy life can get.
March 21, 2018 at 4:27 pm
bump
August 28, 2018 at 11:40 am
bump if anyone wants to take this
January 29, 2019 at 9:54 pm
I look back at this request every once in a while and I also look back at the original request that inspired it and, maybe I'm just tired tonight, but I'm having a difficult time in finding a practical use for such a thing.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2019 at 4:19 pm
I have come across this at work several times.
I found a solution using a custom C# CLR Aggregate function. Interestingly enough, the example MSDN uses for aggregated functions is concatenate:
Its fairly simple to implement if you have a version of Visual Studio handy. I modified this to include a custom delimiter. I don't know what MS has not included this function in any SQL build, but there is CONCAT starting with SQL Server 2012
Also. There is also an article here, at sqlservercentral.com, that explains how the above example is implemented.
https://www.sqlservercentral.com/articles/a-genuine-use-for-a-sql-clr-aggregate
I find this incredible useful and more straightforward than a CTE.
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply