Search the Community
Showing results for tags 'reports'.
-
Help Creating Direct SQL Select Statement for Report
jhculbert posted a topic in Installation and Configuration
I am conducting the Culbert One Name Study using TNG. I would like to create 2 reports, one that identifies all instances for individuals as fathers where his Culbert surname differs from any child's surname and their relationship is a birth, and another for all instances for individuals as children where their Culbert surname differs from their father's surname and their relationship is a birth. I am obviously NOT interested in adoption, foster, or stepchild relationships in these reports. The options available under TNG Admin. on the "Reports >> Add New Report" page do not allow me to create these reports, and I know nothing about creating my own SQL statements. For those genealogists interested, this situation occurs when children change their their surname spelling, or adopt a different surname, and it is not uncommon to be found in surname studies such as mine. I want to be able to easily find those instances in my database, which now consists of almost 28,000 individuals. Thank you in advance for any help with this. -
I used the Generic SQL for Notes Reports (CUSTOM Events for Individuals), from the TNG Wiki Reports – Notes by Graham Chamberlain. It gave me the results that i wanted, but i would like it to be sorted by the dates in the Verdict-colum (which is a char-string). Anyone an idea how to do that ? Any help would be very much appreciated, Jan SQL: SELECT P1.personID, P1.lastname, P1.firstname, X1.note AS Verdict, E1.eventdate, E1.eventplace FROM tng_events E1 INNER JOIN tng_people P1 ON E1.gedcom = P1.gedcom AND E1.persfamID = P1.personID LEFT OUTER JOIN tng_notelinks N1 ON E1.gedcom = N1.gedcom AND E1.eventID = N1.eventID LEFT OUTER JOIN tng_xnotes X1 ON N1.gedcom = X1.gedcom AND N1.xnoteID =X1.ID WHERE E1.eventtypeID = "38" ORDER BY X1.note Matches 1 to 33 of 33 » Comma-delimited CSV file # Person ID Last Name First Name Verdict eventdate eventplace 1 I23748 Hermus Antonetta 01-02-1854, Prov. Gerechtshof Noord-Brabant, Diefstal, 1 maand From 7 Mar 1854 to 6 Apr 1854 2 I23744 Hermus Goverdina (Henrica) 01-02-1854, Prov. Gerechtshof Noord-Brabant, Diefstal, 14 dagen From 6 Mar 1854 to 4 Jun 1854 3 I23749 Hermus Antonia 01-02-1854, Rechtbank Breda, Diefstal, 1 maand From 7 Mar 1854 to 6 Apr 1854 4 I23744 Hermus Goverdina (Henrica) 01-12-1851, Rechtbank Breda, Mishandeling, 14 dagen From 25 Dec 1851 to 29 Dec 1851 5 I23744 Hermus Goverdina (Henrica) 03-05-1847, Rechtbank Breda, Diefstal van Boschgrint, 8 dagen From 15 May 1847 to 23 May 1847 6 I24120 Hermus Cornelia 06-07-1892, Kantongerecht Zevenbergen, Stroperij van onbewerkt hout bij herhaling, 12 dagen From 8 Nov 1892 to 20 Nov 1892 7 I23741 Hermus Joannes Cornelius 07-01-1856, Rechtbank Breda, Diefstal, 14 dagen From 7 Jan 1856 to 21 Jan 1856