You are here: Re: Multiple values into single cell « MsSQL Server « IT news, forums, messages
Re: Multiple values into single cell

Posted by Erland Sommarskog on 05/18/07 20:47

NAJH (neilonusenet@yahoo.co.uk) writes:
> For reasons best ignored, I want to produce a query which has columns:
>
> Orders.OrderID, Products
>
>
> which has results like:
>
> 10248, 'Queso Cabrales, Singaporean Hokkien Fried Mee, Mozzarella di
> Giovanni'
> 10249, 'Tofu, Manjimup Dried Apples'
>
> ________
> so for those who don't really know what I'm on about and haven't got
> access to northwind, I want the second cell to contain the returned
> column of a second query (but in text format)
>
> could anyone suggest a way this could be done? am I entering the land
> of cursors?

If you are on SQL 2000, yes. SQL Server MVP Anith Sen covers the various
methods on http://www.projectdmx.com/tsql/rowconcatenate.aspx.


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

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