Results 1 to 3 of 3
  1. #1
    JangLang is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    7

    Query: Parse Digits

    I'm a newbie and am sure this will be fairly easy. In an Access query, I want to parse out leading * in a record. For example:



    *37643 Eliminate the five digits from the right leaving the *
    **37643 Eliminate the five digits from the right leaving the **
    37643 Eliminate the five digits from the right leaving (Null)

    I've tried Right & Left and not getting it. Thanks for your help!

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

    x represents the field

    Left(x,InStrRev(x,"*"))

    Works for me but if there is no * then the return is an empty string, not Null.
    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.

  3. #3
    JangLang is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    7
    Worked like a charm! Thanks!

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

Similar Threads

  1. Replies: 3
    Last Post: 08-24-2013, 02:31 PM
  2. Replies: 2
    Last Post: 06-04-2013, 07:57 AM
  3. Parse in Query
    By JangLang in forum Access
    Replies: 7
    Last Post: 05-26-2013, 12:51 PM
  4. parse on the fly when running a query
    By johnmerlino in forum Queries
    Replies: 9
    Last Post: 11-19-2010, 10:18 PM
  5. Report query by digits
    By The Phil in forum Reports
    Replies: 4
    Last Post: 04-23-2010, 11:52 AM

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