dennis800121 Posted July 7, 2015 Report Share Posted July 7, 2015 Hello!Can someone please help me! I get the following error:SQL: SELECT tng_people.living, tng_people.private, lnprefix, prefix, suffix, tng_people.branch,firstname, lastname,birthdate,birthplace, tng_people.personID, tng_people.gedcom, nameorder FROM (tng_people ) WHERE (birthplace LIKE "%Bunkeflo%") AND tng_people.gedcom = "DennisTree" ORDER BY birthdatetr descI have the following settings in the report manager but i cant get it to work!"Choose fields to display"Person IDFull nameBirth DateBirth Place"Choose Criteria"Birth Place containsBunkeflo"Choose sort fields"Birth Date (True)Descending (Prev) I would like to get the repport in this sort order: YYYY-MM-DD, can someone help me with this!Thank you for your time! Quote Link to comment Share on other sites More sharing options...
bauschaffender Posted July 7, 2015 Report Share Posted July 7, 2015 Try Birth Date (True) instead of Birth Date on fields to display (SELECT part).Martin Quote Link to comment Share on other sites More sharing options...
dennis800121 Posted July 8, 2015 Author Report Share Posted July 8, 2015 Hello bauschaffender!Thanks for the reply! But i cant find "Birth date (True)" in "Choose Fields to Display:"Sorry for the inconvenience! Quote Link to comment Share on other sites More sharing options...
bauschaffender Posted July 8, 2015 Report Share Posted July 8, 2015 Sorry. You are right. This field is not selectable directly. I dont know why ... Try the following SQL statement:SELECT tng_people.living, tng_people.private, lnprefix, prefix, suffix, tng_people.branch,firstname, lastname, birthdatetr, birthplace, tng_people.personID, tng_people.gedcom, nameorder FROM (tng_people ) WHERE (birthplace LIKE "%Bunkeflo%") AND tng_people.gedcom = "DennisTree" ORDER BY birthdatetr desc;Copy it in the last input field of the report creator and test it.Martin Quote Link to comment Share on other sites More sharing options...
dennis800121 Posted July 8, 2015 Author Report Share Posted July 8, 2015 Yeee! Thank you so much!!!Im trying to do the same but with people who died in the same place i replaced birth with died and even tried death but that didnt work either. Thought that i was simple.... What do i write? i tried this:SELECT tng_people.branch,firstname, lastname, dieddatetr, diedhplace, tng_people.personID, tng_people.gedcom, nameorder FROM (tng_people ) WHERE (diedplace LIKE "%Bunkeflo%") AND tng_people.gedcom = "DennisTree" ORDER BY dieddatetr desc;and...SELECT tng_people.branch,firstname, lastname, deathdatetr, deathhplace, tng_people.personID, tng_people.gedcom, nameorder FROM (tng_people ) WHERE (deathplace LIKE "%Bunkeflo%") AND tng_people.gedcom = "DennisTree" ORDER BY deathdatetr desc; Quote Link to comment Share on other sites More sharing options...
bauschaffender Posted July 8, 2015 Report Share Posted July 8, 2015 Only one "h" to much in deathplace:SELECT tng_people.branch, firstname, lastname, deathdatetr, deathplace, tng_people.personID, tng_people.gedcom, nameorder FROM (tng_people ) WHERE (deathplace LIKE "%Bunkeflo%") AND tng_people.gedcom = "DennisTree" ORDER BY deathdatetr desc;Martin Quote Link to comment Share on other sites More sharing options...
dennis800121 Posted July 8, 2015 Author Report Share Posted July 8, 2015 Thank you so much!! Quote Link to comment Share on other sites More sharing options...
dennis800121 Posted July 9, 2015 Author Report Share Posted July 9, 2015 I tried to make a report about marriges in the same town but i cannot get that either to work Ive tried to google and read some other peoples question but cant get it right. Can someon help me with this again?Are there any manual about SQL and TNG i can look in in the future?Thank you for reading! Quote Link to comment Share on other sites More sharing options...
bauschaffender Posted July 9, 2015 Report Share Posted July 9, 2015 Hi, try this:SELECT familyID, marrdatetr, marrplace, h.personID AS husbandPersonID, h.lastname AS husbandname, h.firstname AS husbandfirstname, w.personID AS wifePersonID, w.lastname AS wifename, w.firstname AS wifefirstname, f.gedcom FROM tng_families AS f LEFT JOIN tng_people AS h ON (f.husband=h.personID AND f.gedcom=h.gedcom) LEFT JOIN tng_people AS w ON (f.wife=w.personID AND f.gedcom=w.gedcom) WHERE marrplace LIKE "%Bunkeflo%" ORDER BY marrdatetr desc;It is without the tree name ... I hope it works for you.Martin Quote Link to comment Share on other sites More sharing options...
dennis800121 Posted July 10, 2015 Author Report Share Posted July 10, 2015 Once again a big thank you for the help bauschaffender!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.