Is this a bug then? On 15/01/07, Hartmaier Alexander <[EMAIL PROTECTED]> wrote:
Not allowed in Oracle 10 too. -Alex ------------------------------ *From:* Sam Crawley [mailto:[EMAIL PROTECTED] *Sent:* Monday, January 15, 2007 3:44 PM *To:* [email protected] *Subject:* [Dbix-class] Oracle 9, distinct and rows/limit Hi, I'm attempting to use distinct with a rows attribute on Oracle 9. DBIC is generating SQL looking something like this: SELECT * FROM ( SELECT A.*, ROWNUM r FROM ( SELECT myCol AS col1 FROM table GROUP BY myCol AS col2 ) A WHERE ROWNUM < 4 ) B WHERE r >= 1 However, this gets me the error message: ORA-00907: missing right parenthesis AFAIK, using 'as' in a GROUP BY expression is not valid Oracle 9 SQL (not sure about 10). If I remove the 'as' in my SQL Console, the query executes successfully. Is there any way around this? Thanks. *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien Handelsgericht Wien, FN 79340b *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* Notice: This e-mail contains information that is confidential and may be privileged. If you are not the intended recipient, please notify the sender and then delete this e-mail immediately. *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
