[Dbix-class] Oracle, distinct and rows/limit
Jess Robinson
castaway at desert-island.me.uk
Tue May 1 13:34:39 GMT 2007
On Fri, 27 Apr 2007, "Dieter Sp=E4th" wrote:
>
> -------- 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 >=3D3D 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.
>
Shiney, care to patch it so that it always uses that one for Oracle?
Jess
More information about the Dbix-class
mailing list