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.
_______________________________________________
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]/

Reply via email to