Re: django, postgresql and eliminating duplicates

2011-03-01 Thread Kenneth Gonsalves
On Tue, 2011-03-01 at 05:05 -0800, DaithiF wrote: > typo, omitted field name in group by: > select member_id, scoredate, count(*) from scoring_record group by > member_id, scoredate having count(*) > 1 I will try that - since I do not have access to the machine, this may take a few weeks. -- re

Re: django, postgresql and eliminating duplicates

2011-03-01 Thread DaithiF
typo, omitted field name in group by: select member_id, scoredate, count(*) from scoring_record group by member_id, scoredate having count(*) > 1 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@

Re: django, postgresql and eliminating duplicates

2011-03-01 Thread DaithiF
why not do the check directly on the database? select member_id, scoredate, count(*) from scoring_record group by member_id having count(*) > 1 (update field/table names as required). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

django, postgresql and eliminating duplicates

2011-02-28 Thread Kenneth Gonsalves
hi, I have a model which allowed duplicates to be entered. Subsequently it was decided to add a unique_together constraint and make the necessary change in the db structure. Postgresql of course will not make a unique_together constraint if there are duplicates. Since this is one off, I wrote a sc