Hi,
I have two tables in a Access 2010 DB as follows:
TableA (linked to Excel) and TableB (linked to sharepoint list)
TableA gets records added, updated and deleted regularly and TableB feeds sharepoint list so remains static there is not link between them.
An initial load from TableA to TableB was performed however TableA has had many updates, inserts and deletes and I need three queries update, delete and insert which I will manually kick off to align both tables.
The field that is in both table and ties tables together is UID.
The following SQL has been obtained but I think it is based on Oracle SQL which does not work in Access? can some help provide and turn the following into MS Access workable SQL please not sure if INNER join is needed or not?:
Update:
Update TableB
Set(Field1, Field2, Field3) = (select Field1, Field2, Field3 from TableA where TableA.UID = TableB.UID);
Delete:
Delete from TableB
Where not exists (select null from TableA where TableA.UID = TableB.UID);
Insert:
Insert into TableB
Select*
From TableA
Where not exists (select null from TableB where TableB.UID = TableA.UID);