Results 1 to 2 of 2
  1. #1
    mystifier is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Posts
    24

    Duplicate first five letters

    Struggling with a small query....


    I want to return a distinct list of ClientRef abbreviations who have duplicated first five letters.

    For example, data:
    AAAAA001
    AAAAA002
    BBBBB001
    CCCCC001
    CCCCC002

    Returns:
    AAAAA
    CCCCC

    My brain's gone to sleep

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,619
    Maybe:

    SELECT Left(fieldname,5) FROM tablename WHERE Count(*)>1 GROUP BY Left(fieldname,5);
    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: 2
    Last Post: 03-27-2012, 03:53 PM
  2. Count uppercase letters
    By Misha in forum Access
    Replies: 8
    Last Post: 03-01-2012, 10:37 AM
  3. capital letters
    By accesshelp in forum Forms
    Replies: 1
    Last Post: 07-14-2010, 12:37 PM
  4. Custom Letters with Grouped Information
    By coolxten in forum Access
    Replies: 2
    Last Post: 05-10-2010, 10:59 PM
  5. Month to return in Capital Letters
    By Alex Motilal in forum Queries
    Replies: 3
    Last Post: 01-09-2010, 05:19 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