Report: Families: husbands/wives, sorted by place of marriage

From TNG_Wiki
Jump to navigation Jump to search

Description: Families: husbands/wives, sorted by place of marriage


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 f.marrplace AS Marriage_place, p.personID, p.lastname, p.firstname, f.marrdate, p.living, p.gedcom 
FROM tng_families AS f INNER JOIN tng_people AS p ON (f.husband=p.personID AND f.gedcom=p.gedcom) 
WHERE f.marrplace<>"" AND f.husband<>"" UNION SELECT f.marrplace, p.personID, p.lastname, 
p.firstname, f.marrdate, p.living, p.gedcom 
FROM tng_families AS f INNER JOIN tng_people AS p ON (f.wife=p.personID AND f.gedcom=p.gedcom) 
WHERE f.marrplace<>"" AND f.wife<>"" 
ORDER BY Marriage_place, lastname, firstname