ideasfactory
New Member
- Joined
- Aug 22, 2013
- Messages
- 38
Hi,
I need some help pretty quick......I have a Access 2010 DB with 2 tables, a linked table to Excel 'Excel_Schedule_TC5' and a linked Table to Sharepoint ' Sharepoint_Schedule_TC5'
The 'Excel_Schedule_TC5' data 900+ rows was imported into 'Sharepoint_Schedule_TC5' all good.
But now I need to keep both tables in sync ('Sharepoint_Schedule_TC5' does not change but 'Excel_Schedule_TC5' changes all the time adds, updates, deletes etc). I need to do the following:
1. Update query with inner join between both on UID field and update specific fields not all. (That is 10 fields from Excel_Schedule to Sharepoint_Schedule) - NEED Help with example SQL for points 2 & 3 below moreso.
I think I am okay using the following:
UPDATE Sharepoint_Schedule_TC5 INNER JOIN Excel_Schedule_TC5
ON Sharepoint_Schedule_TC5.[UID] = Excel_Schedule_TC5.[UID]
SET Sharepoint_Schedule_TC5.UID_Pred = Excel_Schedule_TC5.[UID_Pred];
....add other 9 fields.....etc
2. Delete query applied to 'Sharepoint_Schedule_TC5' with inner join between both based on UID, where records that have been removed from 'Excel_Schedule_TC5' but still exists in 'Sharepoint_Schedule_TC5' these records / rows need to be deleted, as I need to keep both tables in sync so both match the same records based on UID.
It would be appreciated if someone could share the SQL needed to achieve point 2.
3. Append / etc query to 'Sharepoint_Schedule_TC5' from 'Excel_Schedule_TC5' with inner join between both based in UID, where a record has been added in the 'Execl_Schedule_TC5' and does not exist in 'Sharepoint_Schedule_TC5' as I need to keep both tables in sync.
It would be appreciated if someone could share the SQL needed to achieve point 3 also.
I am relatively new to this so any help would be appreciated.
Thanks
I need some help pretty quick......I have a Access 2010 DB with 2 tables, a linked table to Excel 'Excel_Schedule_TC5' and a linked Table to Sharepoint ' Sharepoint_Schedule_TC5'
The 'Excel_Schedule_TC5' data 900+ rows was imported into 'Sharepoint_Schedule_TC5' all good.
But now I need to keep both tables in sync ('Sharepoint_Schedule_TC5' does not change but 'Excel_Schedule_TC5' changes all the time adds, updates, deletes etc). I need to do the following:
1. Update query with inner join between both on UID field and update specific fields not all. (That is 10 fields from Excel_Schedule to Sharepoint_Schedule) - NEED Help with example SQL for points 2 & 3 below moreso.
I think I am okay using the following:
UPDATE Sharepoint_Schedule_TC5 INNER JOIN Excel_Schedule_TC5
ON Sharepoint_Schedule_TC5.[UID] = Excel_Schedule_TC5.[UID]
SET Sharepoint_Schedule_TC5.UID_Pred = Excel_Schedule_TC5.[UID_Pred];
....add other 9 fields.....etc
2. Delete query applied to 'Sharepoint_Schedule_TC5' with inner join between both based on UID, where records that have been removed from 'Excel_Schedule_TC5' but still exists in 'Sharepoint_Schedule_TC5' these records / rows need to be deleted, as I need to keep both tables in sync so both match the same records based on UID.
It would be appreciated if someone could share the SQL needed to achieve point 2.
3. Append / etc query to 'Sharepoint_Schedule_TC5' from 'Excel_Schedule_TC5' with inner join between both based in UID, where a record has been added in the 'Execl_Schedule_TC5' and does not exist in 'Sharepoint_Schedule_TC5' as I need to keep both tables in sync.
It would be appreciated if someone could share the SQL needed to achieve point 3 also.
I am relatively new to this so any help would be appreciated.
Thanks