Results 1 to 2 of 2
  1. #1
    amd711 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    28

    consolidate data from two identical databases

    "consolidate data from two identical databases"

    i found this article for the previous issue

    How to Merge Records from Two Identical Access Databases By Danny Lesandrini



    however, there is step number "4" that i cannot exactly understand why and how?

    1. Run a simple UPDATE query to add the value, lngMaxSiteA_ID, to EmployeeID for every record at Site B tblEmployee. The Cascade Updates should propagate those changes throughout your database.
    1- he gave all records from site "B" database the same value for EmployeeID that is equal to the largest value in site "A" database !!. shouldn't EmployeeID be a primarykey?
    i thought he would update to lngMaxSiteA_ID + row number (or a counter)



    2- how to perform such query? and how to express row number in access?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,600
    The instruction is to ADD (sum) the maximum Site A ID value to each Site B ID value. This will assure that every ID in Site B is greater than the maximum ID in Site A. Cascade update will pass this change into the foreign key fields of dependent tables.

    Use the query designer to help build query. The SQL should be like:

    UPDATE tblEmployees SET EmployeeID=[EmployeeID]+X;

    In place of X type the maximum EmployeeID from Site A.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-25-2012, 12:22 PM
  2. Enter repeat identical data
    By wdrspens in forum Forms
    Replies: 1
    Last Post: 03-16-2011, 06:08 AM
  3. Identical tables for different user data.
    By Bajaz001 in forum Forms
    Replies: 1
    Last Post: 03-15-2011, 10:37 PM
  4. Replies: 4
    Last Post: 01-04-2011, 06:30 PM
  5. Consolidate MDBs
    By RHall in forum Database Design
    Replies: 4
    Last Post: 01-06-2006, 12:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums