Appelmus Posted January 9, 2020 Report Share Posted January 9, 2020 Hello! I have recorded in the "Death" event field and there in the subfield "Cause" the cause of death of a single person. 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 Quote Link to comment Share on other sites More sharing options...
Appelmus Posted January 10, 2020 Author Report Share Posted January 10, 2020 no idea? Quote Link to comment Share on other sites More sharing options...
Scott_Pryer Posted January 10, 2020 Report Share Posted January 10, 2020 Wasn't this addressed in another post? I use the SQL statement provided in this previous post to generate the following information: Quote Link to comment Share on other sites More sharing options...
Appelmus Posted January 10, 2020 Author Report Share Posted January 10, 2020 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? 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 Quote Link to comment Share on other sites More sharing options...
Scott_Pryer Posted January 10, 2020 Report Share Posted January 10, 2020 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 Quote Link to comment Share on other sites More sharing options...
Appelmus Posted January 10, 2020 Author Report Share Posted January 10, 2020 Thank you! It works Can I link the name in the query to the datasheet or is it only possible with the ID? Quote Link to comment Share on other sites More sharing options...
Scott_Pryer Posted January 10, 2020 Report Share Posted January 10, 2020 I think you need to leave the PersonID in there if you want to link. If you have need for reports like this, find a few hours to read about SQL queries or you can find many examples here: https://tng.lythgoes.net/wiki/index.php?title=Category:Henny_Savenije_-_Reports Quote Link to comment Share on other sites More sharing options...
Appelmus Posted January 15, 2020 Author Report Share Posted January 15, 2020 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 Quote Link to comment Share on other sites More sharing options...
Scott_Pryer Posted January 15, 2020 Report Share Posted January 15, 2020 What is the life page? What database does it query, what is the size of that database. Quote Link to comment Share on other sites More sharing options...
Appelmus Posted January 15, 2020 Author Report Share Posted January 15, 2020 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. 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.