Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Asterisks in a Field? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    I

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Asterisks in a Field? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    If you use Like, the asterisk is used as a wildcard. If you want to find a string consisting of a fixed number of asterisks, use = instead of Like.

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

    Re: Query Asterisks in a Field? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    The problem is that the asterisk is a wild-card character when you use the Like operator. If you want to examine a string to see if there is a specific # of asterisks in it, then you will need to use the InStr() function. For example, to find a string of 5 asterisks in a particular field, your WHERE clause would include this: InStr(yourfieldname,"*****")>0

    InStr() returns the postion of the first occurance of the string in the field; if not found then it returns 0.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Asterisks in a Field? (a2k (9.0.6926) SP-3 Jet 4.0 SP-8)

    Thank you for both responses

    John

Posting Permissions

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