On Thursday 21 February 2008 2:17 pm, Ed Leafe wrote: > On Feb 21, 2008, at 4:13 PM, Adrian Klaver wrote: > > People frequently think that because ORDER BY can refer to the > > output-column aliases, other clauses should be able to do it too, > > but this is not so. Conceptually, ORDER BY happens after computation > > of the output rows, so there's no logical inconsistency in allowing > > it to do that ... but it's certainly confused enough people that > > one wonders whether the SQL committee shouldn't have left that wart > > out of the language. > > However, HAVING *must* happen after the computation of the output rows. > > -- Ed Leafe
It is the SQL standard behavior, whether it is the right behavior is another question. I have looked at the SQL standard from time to time and have determined that extended exposure could lead to a brain implosion. -- Adrian Klaver [EMAIL PROTECTED] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
