Morning all, On 20/09/11 09:25, Kjell Rilbe wrote:
> ... > I was under the impression that the query parser would recognize that > the two expressions are identical. That's actually how it works in SQL > Server 2008. In fact, there you HAVE to use that syntax; you CANNOT > refer to the select list's column alias in the group by clause. I wasn't > aware that SQL Server and Firebird are different in this respect. Ditto Oracle. You must repeat the selected expression in the group by clause, you cannot use an alias or a column position. Having said that, I much prefer the Firebird method! > ... >> You will get the groups in order anyway, so you don't actually need the >> ORDER BY clause. > But this is just an implementation artefact, isn't it? Not something > that's actually defined in the language? Again, in Oracle, it is not necessarily true that a group by implies the same order by. It used to - up to version 9i if I remember correctly - but not any longer. Just an observation. Cheers, Norm. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767 ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/