Collecting same value from different tables

%3CLINGO-SUB%20id%3D%22lingo-sub-1772443%22%20slang%3D%22en-US%22%3ECollecting%20same%20value%20from%20different%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1772443%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20been%20unable%20to%20accomplish%20what%20I%20think%20is%20a%20simple%20task%2C%20so%20I'm%20throwing%20this%20to%20the%20experts....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20Access%20database%20syncs%20with%20three%20SharePoint%20lists%20that%20live%20in%20three%20different%20subsites%20within%20the%20same%20SPO%20root%20tenant%20site.%20The%20Access%20db%20also%20has%20a%20few%20additional%20tables%20that%20support%20the%20three%20main%20tables%2C%20like%20names%2C%20clients%2C%20etc.%20Each%20of%20the%20three%20main%20tables%20has%20a%20column%20for%20priority.%20I%20would%20like%20to%20have%20a%20view%20which%20shows%20in%20one%20place%20all%20the%20high%20priority%20items%20from%20all%20three%20of%20the%20lists.%20When%20I've%20tried%20to%20do%20this%20using%20one%20of%20the%20in-app%20wizards%2C%20I%20receive%20error%20messages%20that%20I%20do%20not%20even%20understand.%20Is%20it%20possible%20to%20do%20what%20I'm%20trying%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1772443%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1775075%22%20slang%3D%22en-US%22%3ERe%3A%20Collecting%20same%20value%20from%20different%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1775075%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F243160%22%20target%3D%22_blank%22%3E%40Joseph%20Nierenberg%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20will%20probably%20be%20slower%2C%20but%20it%20should%20work.%20Create%20a%20UNION%20query%20with%20three%20select%20clauses%3A%3CBR%20%2F%3E%3CBR%20%2F%3ESELECT%20Field1%2C%20Field2%26nbsp%3B%3C%2FP%3E%3CP%3EFROM%20SHAREPOINTLIST1%3C%2FP%3E%3CP%3EUNION%3C%2FP%3E%3CP%3ESELECT%20Field1%2C%20Field2%26nbsp%3B%3C%2FP%3E%3CP%3EFROM%20SHAREPOINTLIST2%3C%2FP%3E%3CP%3EUNION%3C%2FP%3E%3CP%3ESELECT%20Field1%2C%20Field2%26nbsp%3B%3C%2FP%3E%3CP%3EFROM%20SHAREPOINTLIST3%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I have been unable to accomplish what I think is a simple task, so I'm throwing this to the experts....

 

One Access database syncs with three SharePoint lists that live in three different subsites within the same SPO root tenant site. The Access db also has a few additional tables that support the three main tables, like names, clients, etc. Each of the three main tables has a column for priority. I would like to have a view which shows in one place all the high priority items from all three of the lists. When I've tried to do this using one of the in-app wizards, I receive error messages that I do not even understand. Is it possible to do what I'm trying?

2 Replies
Highlighted

@Joseph Nierenberg 

This will probably be slower, but it should work. Create a UNION query with three select clauses:

SELECT Field1, Field2, YourPriorityFieldGoesHere

FROM SHAREPOINTLIST1

WHERE 

YourPriorityFieldGoesHere = "High"

UNION

SELECT Field1, Field2, YourPriorityFieldGoesHere

FROM SHAREPOINTLIST2

WHERE 

YourPriorityFieldGoesHere = "High"

UNION

SELECT Field1, Field2, YourPriorityFieldGoesHere 

FROM SHAREPOINTLIST3

WHERE 

YourPriorityFieldGoesHere = "High"

Highlighted
Thank you. I think this might work, but I'm both busy and inexperienced in what it takes to create this, so unfortunately it will be a couple of days until I can return here to mark this as an answer (or otherwise to reply).