SQLAuthority News – Featured on Channel 9

This blog was featured on Channel 9 MSDN over here : TWC9: Scott Hanselman, Jon Galloway, Bing, parallel unit tests, more. I was very proud that this blog was discussed for more than 5 mins (from min 18 to min 23) on my favorite online show. Scott Hanselman, Jon Galloway along with Dan Fernandez make this show very live and very very entertaining.

The article which was featured in the show is SQL SERVER – Comma Separated Values (CSV) from Table Column.

Here are few screenshots from the show where this blog was featured on Channel 9.

Two men talk with a large silver coin figure.

SELECT * FROM Table1 WHERE Country = 'England.

Three show hosts on a couch talking while this blog was featured on Channel 9.

SQL Server Data Model.

The Featured Article and the Modern Way

This was a big moment for me. It was my favorite online show, and hearing my own blog discussed on it felt unreal. It also reminded me that a small, practical script can travel far when it solves a common problem. You do not need a big idea to help people. You need a clear answer to a question many of them are asking.

The featured article showed how to build a comma separated list from a table column. At that time we needed a small trick to do it. Starting with SQL Server 2017, there is a much simpler way with the STRING_AGG function:

SELECT STRING_AGG(name, ', ') AS DatabaseList
FROM sys.databases;

If you are on SQL Server 2017 or later, use STRING_AGG. It is shorter, easier to read and clearly shows what the query is trying to do. The old tricks still work, but the next person who reads your code will thank you for the simple version. I still smile when I think about the day this blog was featured on Channel 9, and I am grateful to every reader who shared that article.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

Database, SQL String
Previous Post
SQLAuthority News – Notes from TechDays 2009 at Infosys, Bangalore
Next Post
SQLAuthority News – An Year of Personal Events – A Life Outside SQL

Related Posts

17 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.