On Friday 29 February 2008 3:49 pm, Ed Leafe wrote:
> On Feb 29, 2008, at 5:10 PM, Uwe Grauer wrote:
> > Maybe it helps to read another explanation.
> > This was a reply from the firebird-support group:
> > http://tech.groups.yahoo.com/group/firebird-support/message/92493?l=1
>
>       No, since they're saying the same thing. Actually, this explanation
> is worse, since it says that Firebird uses the 'as' expression as an
> identifier, and not a column alias. If they can use it in a GROUP BY
> to refer back to the original expression, there is no reason (other
> than they didn't implement it) that they couldn't provide the exact
> same behavior in HAVING.
>
>       If you cannot use the names of derived columns in a HAVING, then what
> is the difference between HAVING and WHERE?
>
> -- Ed Leafe
>
>From the Postgres docs:
HAVING eliminates group rows that do not satisfy the condition. HAVING is 
different from WHERE: WHERE filters individual rows before the application of 
GROUP BY, while HAVING filters group rows created by GROUP BY. Each column 
referenced in condition must unambiguously reference a grouping column, 
unless the reference appears within an aggregate function.

It's the SQL standard. This is a fight you will have to take up with the SQL 
committee.
-- 
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]

Reply via email to