Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,562 of 19,505    |
|    Erland Sommarskog to ray.bradbury9@gmail.com    |
|    Re: Custom agregation in Sql server 6    |
|    01 Feb 12 11:36:21    |
      e7c52835       From: esquel@sommarskog.se              bradbury9 (ray.bradbury9@gmail.com) writes:       > Input data       >       > Col1, col2       > 1, 'nebraska'       > 1, 'boston'       > 2, 'new york'       > 3, 'pekin'       >       > results desired:       > Col1 col2_concatenated       > 1 'nebraska,boston'       > 2 'new york'       > 3 'pekin'       >       > The problem i find is using sql server 6 (sql server 2000 with       > backward 6.0 compatibility actually).       > I cant do custom agregate functions (those are sql 2005 or later)       > I cant do "FOR XML PATH" (2005 or later also)                     In SQL 2000, no matter the compatibility mode, creating comma-separated       lists means lots of dirty work. I didn't check your solution in detail, but       if you have it work, there is no idea to look for anything better. Well, it       is better to do it the client, that's where presentation belongs.                     --       Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se              Books Online for SQL Server 2005 at       http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx       Books Online for SQL Server 2000 at       http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca