[sqlalchemy] Re: using limit w/ distinct on ORACLE (revise bug #536)

2008-03-26 Thread Rick Morrison
MSSQL uses the same type of row_number() technique, so an update that works with both would be great, if possible. Just so I'm clear on this, the plan is to leave the row_number() usage, but to auto-wrap queries using DISTINCT, is that right? Thx, Rick

[sqlalchemy] Re: using limit w/ distinct on ORACLE (revise bug #536)

2008-03-26 Thread Rick Morrison
If we want to do it across the board for MS-SQL, we can. But I'm not as confident in its usage as using a LIMIT keyword supplied by the database. It would take a lot of testing to ensure it works in all cases. Agreed, but there's no version of MSSQL that supports either the LIMIT or

[sqlalchemy] Re: using limit w/ distinct on ORACLE (revise bug #536)

2008-03-25 Thread vkuznet
Ok, here is an example in ORACLE. Table schema (for simplicity I removed unnecessary columns): CREATE TABLE Block ( IDinteger, Name varchar(500) unique not null, Path varchar(500) not null, primary key(ID) ); So

[sqlalchemy] Re: using limit w/ distinct on ORACLE (revise bug #536)

2008-03-25 Thread Michael Bayer
My research shows that ROW_NUMBER() OVER (ORDER BY somecol) is the standard SQL approach to producing the LIMIT/OFFSET functions, which is from this article: http://troels.arvin.dk/db/rdbms/#select-limit I used to use the select rownum directly approach you've outlined below, but

[sqlalchemy] Re: using limit w/ distinct on ORACLE (revise bug #536)

2008-03-25 Thread vkuznet
Yes this works too. So you'll accept/fix the bug :)? Thanks a lot Valentin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To

[sqlalchemy] Re: using limit w/ distinct on ORACLE (revise bug #536)

2008-03-25 Thread Michael Bayer
can you update the ticket please with a summary of this ? also #999 is your schema issue. On Mar 25, 2008, at 5:03 PM, vkuznet wrote: Yes this works too. So you'll accept/fix the bug :)? Thanks a lot Valentin. --~--~-~--~~~---~--~~ You received this