• Home
  • About
  • Resume

T-SQL String Aggregate in SQL Server

By , 06/25/2009 3:00 PM

T-SQL dialect of SQL doesn’t have aggregate functions for strings, but there is an easy workaround using magic of XML.

Consider Employees table of the Northwind database. When I run following query:

SELECT Country, FirstName FROM Employees ORDER BY Country, FirstName

I get following result:

Country FirstName
UK      Anne
UK      Michael
UK      Robert
UK      Steven
USA     Andrew
USA     Janet
USA     Laura
USA     Margaret
USA     Nancy

Now I want to combine first names into comma separated strings grouped by country. Continue reading 'T-SQL String Aggregate in SQL Server'»

Free alternative to Dundas Charts from Microsoft

By , 06/16/2009 12:53 PM

Since Dundas licensing scheme turned out to be insane, I was looking for an alternative and found this beauty

This free control from Microsoft is based on older version of Dundas chart, but offers pretty much the same features and almost the same API (minus some AJAX UI features). It requires .NET 3.5 SP1 and integrates into Visual Studio 2008 toolbar.

Happy charting 🙂

Panorama Theme by Themocracy