Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help using LIKE predicate (97)

    Need help using LIKE predicate
    My database has story titles, but some titles are special b/c they don't start with letters, some of them include:

    'Blue Eyes'
    ...And My Fear Is Great

    I've been trying to specify criteria using the LIKE operator in my query to capture these types, but have come up empty handed. I basically want to show these "special titles" in a special set of results that only show them, but i cannot seem to capture titles that begin with non-alphaNumeric characters like a period or single quotation. What to do?

    i'm using ACCESS 97

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Need help using LIKE predicate (97)

    I think this will work as a selection critieria for the Title field:

    Like [!A-Z]*

    This should return all Titles that don't start with a letter in range A-Z.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Star Lounger
    Join Date
    Oct 2001
    Location
    Western Massachusetts, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need help using LIKE predicate (97)

    I'm working at home with 2000 so I'm not sure if it will change the results or not but this is what I found. I set up a table with three types of Titles. Those beginning with alphaNumeric characters, those beginning with ' (apostrophe's) and those beginning with "..."(no quotes, three periods). My Field was named Title. I created a query with the table.
    In the first column I put
    Expr1: Asc(Left([Title],1))
    and on the criteria line I put
    =133
    In the second column I added the field Title and on the second criteria line down in this column I put
    Like "'*"
    The results returned Titles with a leading ' (apostrophe) Or "..."
    Now the qualifier. MS tells me that ANSI character set values above 127 are determined by the code page specific to your operating system. What that means is your first column might not return 133 for the "..." . You'll have to see what Expr1 returns for your Titles and make any adjustments in your criteria as necessary.
    So give it a try and see what happens.
    Paul

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need help using LIKE predicate (97)

    Well, this works....

    Like "[!A-Z]*"

  5. #5
    Star Lounger
    Join Date
    Oct 2001
    Location
    Western Massachusetts, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need help using LIKE predicate (97)

    Looks like I need to become a man of many fewer words. <img src=/S/bow.gif border=0 alt=bow width=15 height=15>
    Paul

  6. #6
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need help using LIKE predicate (97)

    hehe..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •