Jump to content
TNG Community
dennis800121

Birth order by a specifik place.

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!

Share this post


Link to post
Share on other sites
bauschaffender

Try Birth Date (True) instead of Birth Date on fields to display (SELECT part).

Martin

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
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;

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
dennis800121

Thank you so much!!

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
dennis800121

Once again a big thank you for the help bauschaffender!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×