#70 Sybase and LIMIT

closed-accepted
None
5
2006-08-11
2006-08-07
Eddie
No

In SybaseConnection it reads:

def _queryAddLimitOffset(self, query, start, end):
# XXX Sybase doesn't support LIMIT
return query

Sybase does support LIMIT. I suggest having something like:

def _queryAddLimitOffset(self, query, start, end):
if end:
return "SET ROWCOUNT %i %s SET ROWCOUNT 0" %
(end, query)
return query

Cheers,

eddie

Discussion

  • Oleg Broytman

    Oleg Broytman - 2006-08-09

    Logged In: YES
    user_id=4799

    You do not use "start" parameter. Do Sybase has a notion of
    offset?

     
  • Eddie

    Eddie - 2006-08-09

    Logged In: YES
    user_id=1570436

    Not that I am aware of.

     
  • Oleg Broytman

    Oleg Broytman - 2006-08-11

    Logged In: YES
    user_id=4799

    Well, it is better than nothing. Thank you!

    Applied in the revision 1852 to the trunk, rev. 1853 to the
    0.7-branch.

    PS. Are you sure there is no need for semicolons:

    SET ROWCOUNT %i; %s; SET ROWCOUNT 0

    ???

     
  • Oleg Broytman

    Oleg Broytman - 2006-08-11
    • assigned_to: nobody --> phd
    • status: open --> open-accepted
     
  • Eddie

    Eddie - 2006-08-11

    Logged In: YES
    user_id=1570436

    Yeah, no semicolons.

     
  • Oleg Broytman

    Oleg Broytman - 2006-08-11

    Logged In: YES
    user_id=4799

    ok

     
  • Oleg Broytman

    Oleg Broytman - 2006-08-11
    • status: open-accepted --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks