Re: [web2py] Re: How to find duplicate rows with Web2py DAL

2012-08-17 Thread Loreia
Don't worry this table is modest in size. Any solution is good enough for me, as long as it gets the job done :-)) Thanks and BR Loreia On Fri, Aug 17, 2012 at 9:06 PM, Niphlod wrote: > np. > BTW: no simple ways to do that. Just mind that if there are millions rows > (especially if the columns

[web2py] Re: How to find duplicate rows with Web2py DAL

2012-08-17 Thread Niphlod
np. BTW: no simple ways to do that. Just mind that if there are millions rows (especially if the columns are not indexed) that is going to take some time. On Friday, August 17, 2012 5:09:40 PM UTC+2, Loreia wrote: > > Thanks a lot. > > BR > Loreia > > On Thursday, August 16, 2012 1:23:39 PM UTC+

[web2py] Re: How to find duplicate rows with Web2py DAL

2012-08-17 Thread Loreia
Thanks a lot. BR Loreia On Thursday, August 16, 2012 1:23:39 PM UTC+2, Niphlod wrote: > > group by your unique columns, count the rows, find the ones with count > 1. > > db.define_table( > 'finddup', > Field('f1_name'), > Field('f2_name'), > Field('f3_name') > ) > fd = db.find

[web2py] Re: How to find duplicate rows with Web2py DAL

2012-08-16 Thread Niphlod
group by your unique columns, count the rows, find the ones with count > 1. db.define_table( 'finddup', Field('f1_name'), Field('f2_name'), Field('f3_name') ) fd = db.finddup count = fd.id.count() rtn = db(fd.id>0).select(fd.f1_name, fd.f2_name, fd.f3_name, count, groupby= fd.f