At 10:17 PM -0500 1/14/08, Griggs, Donald wrote:
Hi Duncan,

Regarding: " A DBMS accepting such queries isn't just a little
dangerous, its flat out wrong.  I would ask what rationale there is for
this query not failing. -- Darren Duncan"


I'm not asserting that you have to agree with the rationale, but did you
see and read the discussion that Joe Wilson pointed out to you?

=====================================================================
This issue is debated from time to time on the list:

 http://www.mail-archive.com/sqlite-users@sqlite.org/msg17769.html

Sorry, I missed the url on my first reading.

Also, my first comment was based on the idea that SQL usually returns exactly one row on a query that uses an aggregate but no group-by, and where all result field values are scalar.

However, I can see example "SELECT MAX(a), b FROM T;" conceptually being valid where either 1 row is returned with the 'b' value being collection-typed (containing {'Cat','Dog','Mouse'}), or alternately (such as because actual collection-typed values aren't supported by the DBMS) where that answer were ungrouped such that the main query results in 3 rows where the 'b' value has each of those 3 and the 'a' value is 7 for every row. Or substitute 5 for 3 in either case if you are operating bag-oriented like SQL prefers rather than set-oriented.

So if that's what happens, then fine.

But the OP implied that the query returned exactly 1 row, with '7' for 'a' and a random value 'Mouse' for 'b', and such a result is what I am objecting to.

-- Darren Duncan

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to