Using a Like Statement where data can be either numeric or character.
- From: c.santee@xxxxxxxxx
- Date: 27 Dec 2006 13:36:02 -0800
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
.
- Follow-Ups:
- Re: Using a Like Statement where data can be either numeric or character.
- From: Bob Barrows [MVP]
- Re: Using a Like Statement where data can be either numeric or character.
- Prev by Date: Re: Tips for improving efficiency?
- Next by Date: Re: Using a Like Statement where data can be either numeric or character.
- Previous by thread: Re: Tips for improving efficiency?
- Next by thread: Re: Using a Like Statement where data can be either numeric or character.
- Index(es):
Relevant Pages
|
|