[Dbix-class] Oracle 9, distinct and rows/limit
Sam Crawley
sam_crawley at warpmail.net
Mon Jan 15 14:44:18 GMT 2007
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 >=3D 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070115/19d=
cfd58/attachment.htm
More information about the Dbix-class
mailing list