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: Thursday, January 02, 2014 9:51 AM
Points: 531, Visits: 429
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: Tuesday, April 08, 2014 6:13 AM
Points: 1,694, Visits: 19,550
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 @ 7:59 AM
Points: 41,530, Visits: 34,447
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 @ 10:24 AM
Points: 22,507, Visits: 30,225
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: Thursday, January 02, 2014 9:51 AM
Points: 531, Visits: 429
Nice trick Mark.




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


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
Shameless self-promotion:

http://groupconcat.codeplex.com/


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1365013
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse