[Dbix-class] Oracle, distinct and rows/limit

"Dieter Späth" SHAD0WRUNNER at gmx.de
Fri Apr 27 08:21:53 GMT 2007


-------- Original-Nachricht --------
Datum: Thu, 26 Apr 2007 22:03:32 +0100 (BST)
Von: Jess Robinson <castaway at desert-island.me.uk>
An: dbix-class at lists.rawmode.org
Betreff: Re: [Dbix-class] Oracle, distinct and rows/limit

> 
> 
> 
> On Thu, 26 Apr 2007, SHAD0WRUNNER at gmx.de wrote:
> 
> > Hello,
> >
> > in January there was a discussion about "as"-statementes in group by
> >
> > for instance
> >
> > 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
> >
> > Is this issue allready fixed?
> >
> > Matt S Trout mentioned a patch for this, where can I find this?
> >
> > Regards
> > Dieter
> >
> 
> 
> No idea if it is, but try looking in DBIx::Class::Storage::DBI::Oracle, or
> at the _RowNumberOver for DB2 in DBIx::Class::Storage::DBI.
> 
> Jess
> 

THX a lot for your hint with DBIx::Class::Storage::DBI
and RowNumberOver.

I tried:

$source->storage->sql_maker->limit_dialect('RowNumOver');

and now it seems to work. 'RowNum' is used as default for Oracle.

Greetz
Dieter




-- 
FastJack

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



More information about the Dbix-class mailing list