Results 1 to 2 of 2
  1. #1
    rkdiekhoff is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    1

    Using Regular Expression $ in Access Queries

    Hi,



    I'm trying to write a query in Access, which will select records where " IU" appears at the end of a text field. I've been trying to do this using a regular expression (" IU$") in the query's criteria, but can't get the results I'm looking for when the query hits up against test data containing instances as described above. I've also tried escaping out the $ and using the criteria as part of a LIKE statement, but it still does not work.

    Is there a way to get this to work to in Access?

    Here is basically the different things I've tried:

    SELECT * FROM Test_Table WHERE StringField = ' IU$'
    SELECT * FROM Test_Table WHERE StringField = ' IU\$'
    SELECT * FROM Test_Table WHERE StringField LIKE '* IU\$'
    SELECT * FROM Test_Table WHERE StringField LIKE '* IU$'
    SELECT * FROM Test_Table WHERE StringField LIKE '* IU[$]'


    Thanks,
    rkdiekhoff

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you tried just using Right([YourField],2) = "IU"

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

Similar Threads

  1. Replies: 5
    Last Post: 05-04-2019, 09:02 PM
  2. Replies: 7
    Last Post: 12-30-2009, 11:03 AM
  3. Replies: 1
    Last Post: 09-09-2009, 04:42 AM
  4. Write excel expression in access
    By ktmchugh in forum Queries
    Replies: 0
    Last Post: 07-01-2009, 02:47 PM
  5. Replies: 0
    Last Post: 11-04-2006, 02:31 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