Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Finding the changes between 2 tables

Discussion in 'Information Technology' started by WBTKbeezy, Oct 28, 2005.

  1. WBTKbeezy

    WBTKbeezy
    Expand Collapse
    Guest

    I am trying to find a way to locate the differences between two tables.
    Currently we have a system where we upload an excel file to another system
    then users to that system make changes to the information based on their
    needs. After 2 weeks we download the new file (with all the changes) into a
    new Excel file. The problem is we do not have any way of knowing what
    information has changed between the original file we uploaded and the new
    file 2 weeks later. Is there any way access can pull out the records that
    are different between the two files into a report?
     
  2. Loading...

    Similar Threads Forum Date
    The Salmon Story, Finding Home Sikh Sikhi Sikhism Jul 29, 2016
    Sikhi Guru Nanak's Methodology Of Finding Truth Sikh Sikhi Sikhism Jan 1, 2016
    Movies Ashdoc's movie review---Finding Fanny ( English version ) Theatre, Movies & Cinema Sep 15, 2014
    S Asia Sikh Girls in Afghanistan Face Difficulty in Finding Mr. Right Breaking News Jul 31, 2013
    Finding True Guru Gurmat Vichaar Jan 7, 2012

  3. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    Your table will need to include at least one field that is never changed
    (otherwise there will be no way to match a record in one table with a
    corresponding record in the other) and you will need to compare the old and
    new values of each field that can be changed. Here's an example using the
    Orders table from the Northwind sample database. To keep the example
    reasonably short, I've included only a subset of the fields in the Orders
    table. In this example, the field that is never changed is OrderID ...

    SELECT NewOrders.*
    FROM NewOrders INNER JOIN OldOrders ON NewOrders.OrderID = OldOrders.OrderID
    WHERE (((NewOrders.CustomerID)<>[OldOrders].[CustomerID])) OR
    (((NewOrders.EmployeeID)<>[OldOrders].[EmployeeID])) OR
    (((NewOrders.OrderDate)<>[OldOrders].[OrderDate])) OR
    (((NewOrders.RequiredDate)<>[OldOrders].[RequiredDate])) OR
    (((NewOrders.ShippedDate)<>[OldOrders].[ShippedDate])) OR
    (((NewOrders.ShipVia)<>[OldOrders].[ShipVia])) OR
    (((NewOrders.Freight)<>[OldOrders].[Freight]));

    --
    Brendan Reynolds

    "WBTKbeezy" <WBTKbeezy@discussions.microsoft.com> wrote in message
    news:97331BEE-E057-4BC0-A466-4D0EDC6DE605@microsoft.com...
    >I am trying to find a way to locate the differences between two tables.
    > Currently we have a system where we upload an excel file to another system
    > then users to that system make changes to the information based on their
    > needs. After 2 weeks we download the new file (with all the changes) into
    > a
    > new Excel file. The problem is we do not have any way of knowing what
    > information has changed between the original file we uploaded and the new
    > file 2 weeks later. Is there any way access can pull out the records that
    > are different between the two files into a report?
     

Share This Page