Jump to content
TNG Community
nadinemenezes

Report to identify duplicate COUPLES

Recommended Posts

nadinemenezes

Hi all

 

Can anyone please assist me with a report query that will show duplicate couple entries. There is a lot of endogamy in my tree and I would like to identify if the same couple has been entered more than once. 

 

Thanks in advance!

Share this post


Link to post
Share on other sites
RickM
SELECT personID, lastname, firstname, birthdate, living, p.gedcom, et.tag AS Event, et.description, e.info FROM tng_people AS p
LEFT JOIN tng_events AS e ON (e.persfamID=p.personID AND e.gedcom=p.gedcom)
LEFT JOIN tng_eventtypes AS et ON e.eventtypeID=et.eventtypeID
WHERE tag='EVEN' AND description='Spousename' GROUP BY personID, info HAVING COUNT(*)>1 ORDER BY lastname, firstname, birthdatetr; 

Not sure if this will give you what you want the description is as follows

Wifes with duplicate marriage names (check for data plausibility)

Vrouwen met een dubbele trouw naam. (Check naar de integriteit van de gegevens)

 

This Query is from one of the reports in the

Category:Henny Savenije - Reports

on the TNG Wiki

Share this post


Link to post
Share on other sites
nadinemenezes

Not sure what I am doing wrong but it is not working 

Share this post


Link to post
Share on other sites
RickM

Can you provide a screenshot of the error produced please

Share this post


Link to post
Share on other sites
RickM

Have you made a change to the report?? If I run the report here I get headings 'LIVING' 'TREE' between 'BIRTHDATE' & 'EVENT'

Dbl-Families.jpg

May I suggest also that you run the report from the Admin Reports Menu.. That way you can check the Query and if an error is produced get an idea of what that error is..

Share this post


Link to post
Share on other sites
nadinemenezes

Which parts of the query do I need to amend to suit my tree? I suspect thats why it is not working for me? 

I also dont know how to run it from admin to check for errors

Share this post


Link to post
Share on other sites
RickM

You shouldn't 'need' to change the query to suit your 'Tree'. I do recall reading that different php versions treat sql queries slightly differently which meant the need to specify a tree, but cannot recall where I read that..

As for 'Running' a report from the admin screen.. Whilst in the Admin >> Reports screen you will see three boxes on the left of the inner screen.. the left most one is for 'Editing' the middle to 'Delete' and the right is to 'Test' the Report. Click on the Test box for the report you want to 'Run'..

duplicate.jpg

Share this post


Link to post
Share on other sites
nadinemenezes

Thanks so much Rick,

This is what I am seeing (see attached)

image.png

Appreciate your help with this 

 

Share this post


Link to post
Share on other sites
RickM

Nadine,

Everything seem to be correct in the running of that Query, so perhaps it is not quite the right query you need to show what you are wanting.

Do you know of any 'couples'/families that have a duplicate entry and or any individuals that have a duplicate entry?? If so then obviously this query is not right for what you are asking, if not then unless someone else has used this query and had it find duplicate couples/families then I have exhausted the help I can provide.. I found this report here on the TNG Wiki

Category:Henny Savenije - Reports

You might find something better there.

Share this post


Link to post
Share on other sites
nadinemenezes

Thanks so much for your help, i will have a look there! 

Share this post


Link to post
Share on other sites
RickM

I have no idea about SQL and creating reports, I remain however, at your service.. I will help with anything I can so please ask

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×