I am using the Paginate_with_ajax code as described on the wiki but I am
running into the following problem. The following code will work fine
and retrieved unsorted records in a hunky dory fashion:
OCIError: ORA-00907: missing right parenthesis: select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM componentlog WHERE
(cl_compname like ‘CAPODIR’) ORDER BY cl_spr DESC ) raw_sql_ where
rownum <= 25) where raw_rnum_ > 0
I don’t have much control over this (line is there, line isn’t, line is
there, line isn’t…) and would rather not resort to using a find_by_sql
but if I have to I will.
My guess is it is a problem with the Oracle adapter. I was able to use
all those options together on MySQL. But, then again, that’s probably
not much help because the syntax in MySQL is different :).
-Jonny.
Jeff J. wrote:
It goes totally doolally.
OCIError: ORA-00907: missing right parenthesis: select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM componentlog WHERE
(cl_compname like ‘CAPODIR’) ORDER BY cl_spr DESC ) raw_sql_ where
rownum <= 25) where raw_rnum_ > 0
I don’t have much control over this (line is there, line isn’t, line is
there, line isn’t…) and would rather not resort to using a find_by_sql
but if I have to I will.
My guess is it is a problem with the Oracle adapter. I was able to use
all those options together on MySQL. But, then again, that’s probably
not much help because the syntax in MySQL is different :).
-Jonny.
Jeff J. wrote:
It goes totally doolally.
OCIError: ORA-00907: missing right parenthesis: select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM componentlog WHERE
(cl_compname like ‘CAPODIR’) ORDER BY cl_spr DESC ) raw_sql_ where
rownum <= 25) where raw_rnum_ > 0
I don’t have much control over this (line is there, line isn’t, line is
there, line isn’t…) and would rather not resort to using a find_by_sql
but if I have to I will.
I am running on oracle using the oci driver
Nutbunnies, I was afraid of that. Off to bug (har har, I kill myself)
the guy who wrote the driver
select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM componentlog WHERE
(cl_compname like ‘CAPODIR’) ORDER BY cl_spr DESC ) raw_sql_ where
rownum <= 25) where raw_rnum_ > 0
I guess that your Oracle server version is 8.0, which doesn’t support
order-by clause in a subquery.
select * from (select
raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM componentlog WHERE
(cl_compname like ‘CAPODIR’) ORDER BY cl_spr DESC ) raw_sql_ where
rownum <= 25) where raw_rnum_ > 0
I guess that your Oracle server version is 8.0, which doesn’t support
order-by clause in a subquery.
Hi Takehiro.
Ahhhh right, yes you are correct. Tt doesn’t work in SQL plus either. I
was under the impression that it was a problem with the adaptor or the
offset / limit bit.
Is there a way to mimick that sort of functionality using a hackish
approach?
Manys thanks for the clarification and I suppose you can delte with
extreme prejudice that bug I raised on the rubyforge page
Jeff
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.