Jump to content
TNG Community
Sign in to follow this  
Tom A. Strong

Need help adding SQL command to Henny Savenije's "Media overview by media type" report

Recommended Posts

Tom A. Strong

I am running TNG V.12.x and am interested in the additional SQL Commands to ADD Person ID and Person Name to Henny's "Overview by Media Type" report below.

SELECT mediatypeID AS MediaType, mediaID AS MediaNr, description, gedcom FROM tng_media ORDER BY mediatypeID, description

Thanks in advance,

Tom Strong

Share this post


Link to post
Share on other sites
JWidner

Hi Tom,

Here's what I had to do and it works fine for me. You can arrange the columns however you want. You have to involve the medialinks and people tables to get this to cross over.

SELECT m.mediatypeID AS MediaType, m.mediaID AS MediaNr, m.description, m.gedcom, l.personID as PersonID, p.lastname, p.firstname FROM tng_media as m INNER JOIN tng_medialinks as l ON (m.mediaID=l.mediaID) INNER JOIN tng_people as p ON (p.personID=l.personID)

 

Jim Widner

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
Sign in to follow this  

×