You are here: Re: stored procedure to concatenate column value sin a single cell? « MsSQL Server « IT news, forums, messages
Re: stored procedure to concatenate column value sin a single cell?

Posted by Erland Sommarskog on 01/08/07 08:29

parth (Parth.M@gmail.com) writes:
> I want to achieve the following transformation of data using a stored
> procedure.
>
>
> Source
>
> col1 col2(varchar)
> -------------------------
> 1 1.1
> 1 1.2
> 2 2.1
> 2 2.2
> 2 2.3
>=================
>
> Desired Result
>
> col1 col2(varchar)
> --------------------------
> 1 1.1 | 1.2
> 2 2.1 | 2.2 | 2.3
>=====================

Look up the recent thread "Script to combine multiple rows into 1 single
row", where I gave a suggestion to someone who also was doing data migration
and had the same requirement.


--
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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация