Jump to content
TNG Community

SQL report listing events including SourceID


OBD

Recommended Posts

Hi,

I have a simple SQL that works OK.
It makes a list of selected events with columns (translated from Norwegian) “Date of division of inheritance”, “Place Name” and “Testator”.

The SQL:
SELECT e1.eventdatetr as DatoSkifteStart,e1.eventplace as Stedsnavn,e1.info as Arvelater
FROM (tng_people )
LEFT JOIN tng_events e1 ON tng_people.personID = e1.persfamID AND tng_people.gedcom = e1.gedcom AND e1.eventtypeID = "1"
WHERE ((e1.info LIKE "Skifte%") AND (tng_people.living != 1)) AND tng_people.gedcom = "SiMT"
GROUP BY e1.eventdatetr,e1.info
ORDER BY e1.eventdatetr,e1.eventplace

The report:


image.png

The challenge:
I would like to have a new column “SourceID”.
Active, ie with the option to click and open the source.

Each of the selected events has one unique source attached.
And each person mentioned in the document of division of inheritance is linked to this source.

An event looks like this in edit mode (Person view):

image.png

Regards
Ole Bjørn

Link to comment
Share on other sites

Hi,

I have solved one of the challenges.
sourceID is now included in the report.

The amended SQL:
SELECT sourceID, eventdate, eventplace, info
FROM tng_events e
INNER JOIN tng_citations c ON c.eventID = e.eventID
WHERE info LIKE "Skifte %"
GROUP BY sourceID
ORDER BY eventdatetr

The updated report:

image.png

 

The remaining challenge:
How to make the column sourceID “active” ie available with hyperlink:

image.png

 

Regards
Ole Bjørn

 

 

 

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