Jump to content
TNG Community

sql query for cause of death


Appelmus

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

:)

 

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...