On Mar 6, 11:17 am, mdipierro <[email protected]> wrote:
> Can you print the query (print ....._select....) and see how it
> differs? My guess is the LIMIT BY attribute.

SELECT person.id, person.name FROM person WHERE person.id>0 LIMIT 100
OFFSET 0;

The problem, as you guessed, is LIMIT.
There is no LIMIT in db2 but there is:

SELECT * FROM table FETCH FIRST 100 ROWS ONLY

which would be equivalent to limitby=(1,100).

But limitby=(min,max) can be simulated with pyodbc functions:

...limitby=(10,30)...
rows=cursor.execute('select * from person fetch first 30 rows
only').fetchall()[10:]

Maybe something similar can be done for mssql.

Another thing that does not work in db2 is table.truncate() and there
is no equivalent.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to