In Oracle you can use rowcount, for example, select * from table where rowcount<200
In sql server I think you can set a rowcount: SET ROWCOUNT 100 (or whatever) then do your query SET ROWCOUNT 0 - sets it back to normal In other I don't know. A. C. Censi On Wed, Jun 10, 2009 at 7:05 PM, mdipierro<mdipie...@cs.depaul.edu> wrote: > > I do not think that is possible but I may be wrong. If you teach how > to do it in SQL I will tell you how to translate in web2pyese. > > Massimo > > > On Jun 10, 3:18 pm, Marcos Prieto <mark...@gmail.com> wrote: >> Hi, >> >> I'm trying to do a query in which I use select() with count and >> groupby >> >> db().select(field1, field1.count(), groupby=field2) >> >> but I'd like to be able to use the count column to limit the results, >> adding a where clause to the SQL, something like "where count > x" >> >> Is that possible? how? >> >> Thanks, >> >> Marcos. > > > -- A. C. Censi accensi [em] gmail [ponto] com accensi [em] montreal [ponto] com [ponto] br --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---