Report: Branches with associated individuals, ordered by branch and individual's name

From TNG_Wiki
Jump to navigation Jump to search

Description: Branches with associated individuals, ordered by branch and individual's name

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 bl.branch, b.description AS branche_descriptions, p.personID, p.lastname, p.firstname, 
p.birthdate, p.living, p.gedcom FROM tng_branchelinks AS bl
INNER JOIN tng_branches AS b ON (bl.branch=b.branch AND bl.gedcom=b.gedcom)
INNER JOIN tng_people AS p ON (bl.persfamID=p.personID AND bl.gedcom=p.gedcom)
ORDER BY branch, lastname, firstname, birthdatetr;