Report: Double names

From TNG_Wiki
Jump to navigation Jump to search

Description: Wifes with duplicate marriage names (check for data plausibility)

Copy and paste the text between the lines into the reports section below "OR Leave Display, Criteria and Sort fields blank and enter direct SQL SELECT statement here:" and give it the title you think is appropriate

SELECT personID, lastname, firstname, birthdate, living, p.gedcom, et.tag AS Event, et.description, 
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