Hi,  I've attached the oracle.patch file for 
gluon/packages/dal/pydal/adapters.oracle.py  

- Tom

On Saturday, September 24, 2016 at 9:25:06 PM UTC-6, Massimo Di Pierro 
wrote:
>
> I can take care of it. Can you email me your patch as an attachment?
>
> On Friday, 23 September 2016 19:46:34 UTC-5, tomt wrote:
>>
>> I'd be happy to give it a try, but I'm not sure what steps to take.  When 
>>> I go to github and click on create new pull request it appears I have to 
>>> select a branch to compare to. I'm uncertain if I am supposed to select 
>>> admin, experimental, or enter a value of my own.  Does web2py have any 
>>> suggested steps, or a guideline for using github?  
>>>
>>
>> - Tom 
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--- oracle.py	2016-05-09 18:21:47.000000000 -0600
+++ oracle.py.new	2016-09-25 19:01:04.000000000 -0600
@@ -67,7 +67,30 @@
                 sql_w_row = sql_w + ' AND w_row > %i' % lmin
             else:
                 sql_w_row = 'WHERE w_row > %i' % lmin
-            return 'SELECT %s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o)
+ 
+            # remove blanks from sql_f
+            mysql_f = sql_f.replace(" ","")
+            # split into list
+            myfields = mysql_f.split(",")
+            select1 = "SELECT /*+ FIRST_ROWS(10) */"
+            select1 = "SELECT"
+            select2 = "SELECT"
+            select3 = "SELECT"
+            for i in range(len(myfields)):
+                #select1 += ' c%s "%s",' % (i,myfields[i])  #Full field names are not required
+                select1 += ' c%s,' % (i)
+                select2 += ' w_tmp.c%s,' % (i)
+                select3 += ' %s c%s,' % (myfields[i],i)
+            # remove trailing ,
+            select1 = select1.rstrip(",")
+            select3 = select3.rstrip(",")            
+            mysql = "%s\nFROM (\n  %s ROWNUM rn\n  FROM (\n    %s" % (select1,select2,select3)                  
+            mysql += "\n    FROM %s\n    %s\n    %s" % (sql_t,sql_w,sql_o)
+            mysql += "\n  ) w_tmp\n  WHERE ROWNUM <= %s\n)WHERE rn > %s\n" % (limitby[1],limitby[0])
+            #print "mysql:%s" % (mysql)                        
+            return mysql            
+            #return 'SELECT %s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o)
+
         return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, sql_o)
 
     def constraint_name(self, tablename, fieldname):

Reply via email to