![]() |
|
#1
|
|||
|
|||
![]()
Full Update of one table based on another table need up to 3 steps:
1. A delete query to remove records not present in source table from target table; 2. An update query to update all remaining records in target table with info from matching records in source table; 3. An insert query to add into target table records present in source table and missing in target table. Or you simply clear all info from target table, and insert it anew from source table. In case you have backend database in SQL server, it will something like Code:
DELETE * FROM TargetTable INSERT INTO TargetTable SELECT * FROM SourceTable NB! When your database is multi-user one, you may have locking problems when you want to update the whole table in back-end, and there are several users using the app at same time. You can also update the table in SQL Server running a stored procedure in SQL server. The stored procedure reads data directly from Excel table, and updates the info in SQL Server Database table with it. You can call the stored procedure from your Access front-end using a pass-throw query, or you can set up a job, which runs the procedure on schedule. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
EXCEL IF STATEMENT Help | bksmith | Excel | 3 | 07-27-2021 07:01 AM |
Directional help in constructing an Excel 2016 If, Or, And Then Formula Statement | Gwilson | Excel | 3 | 04-13-2017 11:31 AM |
Help! figuring if statement with 2 vlookups excel 2013 | MWATKINS7111 | Excel | 3 | 02-24-2017 12:58 AM |
select statement in macro | Nicolette | Excel | 1 | 11-19-2013 01:38 AM |
![]() |
ishaw | Word | 1 | 10-17-2011 02:23 AM |