Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    9

    Question Unanswered: Trying to find the underscore ...

    I'm attempting to doing a search of the db for all name entries with the underscore character "_".

    I use %_% and get all the entries.

    What am I doing wrong?

    Help .... thanks!

  2. #2
    Join Date
    Oct 2003
    Posts
    84
    _ is a wildcard for any ONE character, like % is a wildcard for 0 or more characters. try this instead: .... LIKE '%[_]%'

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    or...
    where charindex('_', YourField) > 0
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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