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