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: 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)
  • Re: Wierd output instead of 0s and 1s
    ... Sathyaish scribbled the following: ... > A practice excercise from K&R. ... I'd be very grateful to people who helped. ... is printing the characters whose character code is 0 and 1, ...
    (comp.lang.c)
  • Re: GL -- Reva Broke Joshs Heart
    ... I'm grateful to what he did to Annie tho, ... characters ever since she went over the edge! ... I'm guessing Cynthia Watros is grateful, too, since Annie was as dull ...
    (rec.arts.tv.soaps.cbs)