Using a Like Statement where data can be either numeric or character.



All,
I was hoping someone would be of help me figure out how to use a Like
Statement where the field contains characters or numeric values.

When I use the following strSQL with the variable valueToCheckFor
containing only characters the SQL string executes properly and returns
the correct number of records:

valueToCheckFor = "Text"
strSQL = "SELECT [tmpCLID].[clID] FROM tmpCLID WHERE
((([tmpCLID].[clID]) Like " & Chr(34) & valueToCheckFor & "%" & Chr(34)
& "));"

However when valueToCheckFor = "Text01" even though there are records
that matches this value, my query returns zero records.

I would be grateful for any help. Thanks in advance. - CES

.



Relevant Pages

  • Re: Using a Like Statement where data can be either numeric or character.
    ... The type of characters in the data or search string is irrelevant. ... When I use the following strSQL with the variable valueToCheckFor ... Can you reproduce this with your database's native query execution tool? ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: Using a Like Statement where data can be either numeric or character.
    ... The type of characters in the data or search string is irrelevant. ... When I use the following strSQL with the variable valueToCheckFor ... Can you reproduce this with your database's native query execution tool? ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: YACD: Demonspawn Conjurer
    ... I would be grateful if you limited your line length in posts to ... at most 80 characters. ... Looks like I need to change newsreader. ...
    (rec.games.roguelike.misc)
  • Re: YACD: Demonspawn Conjurer
    ... Cleared Orcish Mines and main dungeon down to level ... I would be grateful if you limited your line length in posts to ... at most 80 characters. ...
    (rec.games.roguelike.misc)
  • Re: Crack GPG Password
    ... It's about 20 characters long. ... I'd be really grateful (and would be less stupid in the ... and it just slipped my mind. ... which I could enter in the known digits and have it use those to crack ...
    (Ubuntu)