Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

TSQL Suggestion: Support GROUP_CONCAT Expand / Collapse
Author
Message
Posted Wednesday, September 26, 2012 3:24 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, October 22, 2014 7:18 AM
Points: 531, Visits: 433
Please vote:

https://connect.microsoft.com/SQLServer/feedback/details/764820/support-group-concat-aggregation-function





Post #1364951
Posted Wednesday, September 26, 2012 3:29 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 1:40 PM
Points: 1,683, Visits: 19,609
The query can be made to handle XML special characters by doing this


SELECT t.id,
STUFF(
(
SELECT ';'+x.col1
FROM @MyTable x
WHERE x.id=t.id
ORDER BY x.col1
FOR XML PATH(''),TYPE
).value('.','VARCHAR(1000)'),1,1,'') as con_str
FROM @MyTable t
GROUP BY t.id;



____________________________________________________

How to get the best help on a forum

http://www.sqlservercentral.com/articles/Best+Practices/61537

Never approach a goat from the front, a horse from the rear, or a fool from any direction.
Post #1364952
Posted Wednesday, September 26, 2012 5:38 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:14 PM
Points: 40,615, Visits: 37,081
Or create your own CLR user-defined aggregate


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1364981
Posted Wednesday, September 26, 2012 6:39 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 4:29 PM
Points: 20,860, Visits: 32,886
peterhe (9/26/2012)
Please vote:

https://connect.microsoft.com/SQLServer/feedback/details/764820/support-group-concat-aggregation-function




Make it easier for others:

https://connect.microsoft.com/SQLServer/feedback/details/764820/support-group-concat-aggregation-function



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1364992
Posted Wednesday, September 26, 2012 8:00 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, October 22, 2014 7:18 AM
Points: 531, Visits: 433
Nice trick Mark.




Post #1365002
Posted Wednesday, September 26, 2012 9:20 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:51 PM
Points: 7,140, Visits: 12,763
Shameless self-promotion:

http://groupconcat.codeplex.com/


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1365013
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse