Hi,
I have written a UDA that concatenates cities of each country. For example:
USE Northwind
GO
SELECT Country, dbo.MyUDA(City) AS Cities FROM Customers
GROUP BY Country
GO
It produces a result like this:
Country Cities
------ ------
Brazil Sao Paulo, Rio de Janeiro, Sao Paulo, Sao Paulo, Campinas
France Lyon, Lyon, Nantes, Lille, Nantes, Nantes
But I don't want duplicate cities in the concatenated result. I thought
IsInvariantToDuplicates property on my Accumulate method will correct the
problem however it didn't. What does IsInvariantToDuplicates do and how can
I remove duplicates?
Thanks in advance,
Leila
|