Append vs. Union query?

seashton

Registered User.
Local time
Today, 00:32
Joined
Oct 11, 2000
Messages
14
What is the best method to use? I have been tasked to retrieve all the data from many SharePoint tables (anywhere to 30 to 100 tables that I have found so far) and they all have identical field names and there are no primary keys. These tables contain supplier surveillance records from many past and present projects that management wants to analysis moving forward. I have successfullly linked 30+ tables to my database, created a master table with the same field names and set an autonumber as the Primary key for the master table. I then started creating Append queries to update the new master table which works fine but that is ALOT of Append queries to create and wandering if there is a better way? Can I write code in the background to perform these function(s) and how would it be done because each table has about 10 fields? Would a Union query be an option and if so, how would this be written? If someone out there has any ideas or an example of code written that has this many tables with many field names I could probably figure it out.

1) I would also like to know how I would add the "SharePoint linked table name" as a field when I update the master table?
 
OK, I figured out the Union query and it is working as it should but how do I add the "SharePoint linked table name" as a field so I can identify which table the record originated from? Can the Union query be used to update my master table and then add the "SharePoint table name" as a field in the master table? Any suggestions?

From the number of people viewing my message I hope there is someone out there with this knowledge?
 

Users who are viewing this thread

Back
Top Bottom