You are here: Re: Problem concatenating column values into string... « MsSQL Server « IT news, forums, messages
Re: Problem concatenating column values into string...

Posted by Erland Sommarskog on 10/02/75 11:44

david.buckingham@gmail.com (david.buckingham@gmail.com) writes:
> Erland: I'm confused regarding the article that you posted. I am not
> calling any functions in the select list, or the order by clause. I
> don't understand "The correct behavior for an aggregate concatenation
> query is undefined."

An aggregate concatenation is when you try:

SELECT @x = @x + col FROM tbl

that is, precisly what you had in your code.

And the result of this operation is undefined. That is, there is no
guarantee that you get the result you expect.

The article itself is admittedly strange, because if first says
that this type of operation is undefined, and then it tries to explain
how you should use it anyway.

> I am successfully using similar queries in multiple solutions,

Yes, the method is deceivable, as it often gives the desired result,
despite that there is no guarantee for it.



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.seBooks Online for SQL
Server 2005
athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000
athttp://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

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