Jump to content
TNG Community

Birth order by a specifik place.


dennis800121

Recommended Posts

dennis800121

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 desc

I have the following settings in the report manager but i cant get it to work!

"Choose fields to display"
Person ID
Full name
Birth Date
Birth Place

"Choose Criteria"
Birth Place
 contains
Bunkeflo

"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!

Link to comment
Share on other sites

dennis800121

Hello bauschaffender!

Thanks for the reply! But i cant find "Birth date (True)" in "Choose Fields to Display:"

Sorry for the inconvenience!

Link to comment
Share on other sites

bauschaffender

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

Link to comment
Share on other sites

dennis800121

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;

 

Link to comment
Share on other sites

bauschaffender

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

Link to comment
Share on other sites

dennis800121

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!

Link to comment
Share on other sites

bauschaffender

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...