SQL string to identify duplicate records in two different tables

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: rotor (anonymous_at_discussions.microsoft.com)
Date: 05/13/04


Date: Thu, 13 May 2004 05:21:04 -0700

Hello, I'm using Access 2002, ADO, DAO, and SQL. PLEASE help me.

I have several Access DBs that are used only as a container for the purpose of holding query details as audit support. So the tables contained in these DBs are not linked and do not have any cross relationships.

In one particular DB I have two tables, each containing a separate import from Oracle. I need a SQL string that will somehow identify those records in Table1 that are also contained in Table2. Each table has 26 columns, but only three columns (call them Field1, Field2, Field3) are needed to determine a match. Table1 has about 12,000 records, Table2 has about 113,000 records.

Can someone please help me out here with a SQL string that will update a column in Table1 to indicate those records that are in both tables? Or, the query could alternatively write the duplicates into a new table. I'm relatively new at working with Access, please provide example code.

Any assistance on this would be greatly appreciated. Thanks much in advance.



Relevant Pages

  • RE: Multiple Access and ODBC connections
    ... We're running Access 2003, SQL 2005. ... server when we deploy a new release. ... We are linked to test SQL and Access DBs, and developers change the links to ...
    (microsoft.public.access.modulesdaovba)
  • Re: discriminant questions
    ... and I don't see the purpose of using this construct. ... case it cannot serve as a good basis for smart pointers. ... elements stored inside of a container. ... It should be noted that the primary purpose behind all of these things is ...
    (comp.lang.ada)
  • Updating DB with values depending on Key Value
    ... I have worked with DTS before, but usually just to import Access dbs to SQL ... I need to get this data into an existing table on the SQL Server. ...
    (microsoft.public.sqlserver.dts)
  • Re: Windows Ada database support.
    ... But you can translate into SQL. ... : My_ Fancy_DB.Execute ("BAZ ...")? ... a container that refers to my object. ...
    (comp.lang.ada)
  • Re: 2005 - Integer may not be NULL but is
    ... If you explicitely specify column "container" with the ... SQL Server MVP ... I have some fields that are being imported with SSIS which are integers. ...
    (microsoft.public.sqlserver.programming)