Create A Comma Delimited List From a Column
-
Saturday, September 01, 2012 12:43 PM
I have SQL Server 2012. I can't run either function here:
http://archive.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=createacommadelimitedlist
This solution works fine:
SQL Server 2005 / SQL Server 2008 Solution
However, the SQL 2000 Solution does NOT work for me!! My question is 2-fold. How can I make this work for SQL Server 2012? Also, isn't SQL Server backwards-compatible? I would think newer technologies work on older technologies, but this doesn't seem to be the way. Or, I'm doing something wrong.
Ryan Shuell
All Replies
-
Saturday, September 01, 2012 1:12 PM
I ran both solutions on my SQL 2012 instance without problems. What does not work mean? Are you getting an error or unexpected results?
Code is generally backwards compatible but there are cases where it is not as the product evolves over time. Deprecated features, behavior changes, breaking changes and discontinued features are documented in the Backward Compatibility topic of the SQL Server Books Online (http://technet.microsoft.com/en-us/library/ms143532). It's a good idea to avoid deprecated features and move toward remediation when announced. That will allow you to stay ahead of the curve.
Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/
- Proposed As Answer by Naomi NMicrosoft Community Contributor, Moderator Sunday, September 02, 2012 3:11 AM
- Marked As Answer by Kalman TothMicrosoft Community Contributor, Moderator Tuesday, September 04, 2012 6:36 PM
-
Saturday, September 01, 2012 1:19 PM
Sorry to waste people's time with this silly question. I just tried the function again and it works perfectly fine now!! So weird!!!!
Ryan Shuell
- Edited by ryguy72 Saturday, September 01, 2012 1:19 PM
-
Saturday, September 01, 2012 6:15 PMThe better question is why are you in violation First Normal Form (1NF) by having such a garbage schema design. I hope you asked so you can get rid of it.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking in Sets / Trees and Hierarchies in SQL

