Forum

Dubbele namen zoeke...
 
Notifications
Clear all

Dubbele namen zoeken in je stamboom  

  RSS
Renze
(@renze)
Webmaster Admin

Om dubbele namen in je stamboom te zoeken kun je onderstaande rapport gebruiken. Wat in het rood staat moet je aanpassen naar je eigen website.

SELECT p1.personID, p1.birthdate, p1.lastname, p1.firstname, p1.birthplace, p1.deathdate, p1.gedcom
FROM tng_people p1
INNER JOIN
(SELECT
p2.lastname, p2.firstname, p2.birthplace, p2.deathdate, p2.gedcom, EXTRACT(YEAR FROM birthdatetr) AS BirthYear, COUNT(*) AS Number
FROM tng_people p2
WHERE p2.gedcom
= 'ID VAN JE GEDCOM'
AND p2.birthdatetr
<>
'0000-00-00'
GROUP BY p2.lastname, p2.firstname, BirthYear HAVING Number>1) p3
ON p1.gedcom
= p3.gedcom
AND p1.lastname
= p3.lastname
AND SUBSTRING_INDEX(TRIM(p1.firstname), ' ', 1)
=
SUBSTRING_INDEX(TRIM(p3.firstname), ' ', 1)
AND EXTRACT(YEAR
FROM p1.birthdatetr) =
p3.BirthYear
ORDER BY p1.lastname, p1.firstname, p1.birthdatetr
Citaat
Geplaatst : 12 november 2020 21:01

error: Alert: Content is beveiligd !!