Results 1 to 6 of 6
  1. #1
    DaveT99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Location
    SPAIN
    Posts
    94

    Find Duplicates Based on First N Characters of a string

    I havebeen googling this without success. I have a table DATA, assume one field called DESCRIPTION.


    Is it possible to list dulicate records based on e.g the first 35 characters of the description
    Thanks in advance

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    yes,

    create a query and use a left function for the first 35 chars - something like

    iif(len(description)<35,description, left(description,35))

    then use the find duplicates query wizard based on this query

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Can u just use:
    left([description],35)

  4. #4
    DaveT99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Location
    SPAIN
    Posts
    94
    Thanks, never thought of a 2 query solution

  5. #5
    DaveT99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Location
    SPAIN
    Posts
    94
    Thanks once again, s simpler approach to a 2 query solution, which I hadnt thought off. Its like thinking outside of the box
    Cheers

  6. #6
    DaveT99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Location
    SPAIN
    Posts
    94
    Hi VIP
    Perhaps I misunderstood, but I entered your expression in the criteria and worked but when I put less characters e.g 22 it drew blank

    Did some research and then created a new field Expr1: Left([Part_Desc],22) and worked perfectly

    Thanks for putting me on the right track, I will try the IIF solution for fun

    CHEERS

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

Similar Threads

  1. Replies: 3
    Last Post: 01-18-2016, 01:55 PM
  2. Get trailing Characters from String
    By jaykappy in forum Queries
    Replies: 4
    Last Post: 09-03-2014, 09:19 AM
  3. Omitting characters from a string
    By TonyB in forum Queries
    Replies: 4
    Last Post: 04-07-2014, 08:03 AM
  4. Characters before searched string
    By cleme1q in forum Access
    Replies: 4
    Last Post: 12-10-2011, 11:22 AM
  5. replace characters in a string
    By blazixinfo@yahoo.com in forum Access
    Replies: 6
    Last Post: 08-06-2009, 03:36 PM

Tags for this Thread

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