Jump to content
TNG Community
Appelmus

sql query for cause of death

Recommended Posts

Appelmus

Hello!

I have recorded  in the "Death" event field and there in the subfield "Cause" the cause of death of a single person.

Screenshot_2020_01_03_22_33_57.jpg

It looks like Abb1

What is a sql query with which I can output the cause of death and the name of the person?

Best regards

A

Share this post


Link to post
Share on other sites
Appelmus

no idea?

Share this post


Link to post
Share on other sites
Scott_Pryer

Wasn't this addressed in another post?

 

I use the SQL statement provided in this previous post to generate the following information:

image.png

Share this post


Link to post
Share on other sites
Appelmus

Hello Scott!
Indeed. I have tested your proposal. Sometimes it worked, then again it didn't. That was probably due to my computer or.... I don't know?
I have just tested your proposal again with Mamp. Now it works. 
Two problems remain:
a) How can I convert the English table titles to German?

Screenshot_2020_01_10_16_13_53.jpg


b) Can I choose the names as the link to the data sheet instead of the ID?

Thanks again for your help

 

www.ofb-lammersdorf.de

Share this post


Link to post
Share on other sites
Scott_Pryer

Queries are not to difficult to write for basic reports.  I suggest you do some reading to get the basics so you can get exactly what you want.

Here is the original statement with the addition of custom labels:

SELECT personID,firstname as Vorname,lastname as Nachname,tng_eventtypes.tag,tng_events.eventdatetr,tng_events.eventplace,tng_events.cause as Ursache FROM tng_people,tng_events,tng_eventtypes where tng_events.persfamID=tng_people.personID and tng_eventtypes.eventtypeID=tng_events.eventtypeID and tng_eventtypes.tag='DEAT'

Good luck

Share this post


Link to post
Share on other sites
Appelmus

 

Thank you!

It works

Screenshot_2020_01_10_17_26_52.jpg


Can I link the name in the query to the datasheet  or is it only possible with the ID?

Share this post


Link to post
Share on other sites
Appelmus

Hello Scott!

The same question: The query works on my test pages on the net or on Mamp. It does not work on the life page on the net. There I only get the table heads. The runtime of the query is relatively long. I suspect that the long runtime is the reason to cancel the query on the life side.
Can I set a runtime limit?

Best regards

Share this post


Link to post
Share on other sites
Scott_Pryer

What is the life page? What database does it query, what is the size of that database.    

Share this post


Link to post
Share on other sites
Appelmus

Hello Scott!
The life page is the published page, the other is a test page. I also described the problem to my hoster. He found that the database in the life page is different from the one in the test page. Actually, they should be the same in terms of structure. The life page has the newer data. I will now back up the data banks and then transfer the table structure of the test page to the life page and then copy the contents of the life page there. I hope that this open heart operation will succeed.

:)

 

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

×