Results 1 to 2 of 2
  1. #1
    baronqueefington is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    32

    Help data cleaning


    Hello,

    I have a table that includes 2 fields which I need compared, the table looks like this:

    case number ID Name
    1 1 Bob
    2 1 Bobby
    3 2 John
    4 1 Bobi
    5 3 Mark

    I need a query that checks to see if the ID and name are consistent. So in the above example ID's 2 and 3 are ignored but ID 1 will appear.

    This is a hang over from imported spreadsheet data and will eventually be moved over to a lookup table, which should stop this from being an issue.

    Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Try:

    SELECT DISTINCT *.T1 FROM TableName AS T1 INNER JOIN TableName AS T2 ON T1.ID = T2.ID WHERE T1.[Name] <> T2.[Name] ORDER BY T1.ID;
    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. Cleaning up Queries
    By shifty in forum Queries
    Replies: 1
    Last Post: 04-26-2015, 06:00 PM
  2. Replace Button not working, Data Cleaning, Help!
    By Wario84 in forum General Chat
    Replies: 5
    Last Post: 11-28-2014, 01:01 PM
  3. Cleaning up a spreadsheet
    By tonydepo in forum Import/Export Data
    Replies: 16
    Last Post: 11-13-2012, 04:27 PM
  4. Cleaning Data
    By Sck in forum Queries
    Replies: 1
    Last Post: 07-22-2010, 12:43 AM
  5. Cleaning Up Data - Need Help
    By NeedHelp in forum Access
    Replies: 2
    Last Post: 06-05-2010, 10:06 AM

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