C
ChasW
I want to query for individual characters in a field and exclude other
possible characters.
Right now I am using for inclusion:
WHERE [tbl].[column] LIKE "*" & "A" & "*"
and for exclusion:
WHERE [tbl].[column] NOT LIKE "*" & "B" & "*"
If it was given that there were up to 7 possible different characters
that could be in this field, what would be the most efficient way to
query for the presence of any number of those 7, while excluding the
remaining possibilities.
For example:
The query will look for fields with any combination of A and/or B
and/or C.
It will need to exclude any fields that have D, E, F, G
The characters could be in this field in any order.
What is a more efficient way than having the query be 3 LIKEs and 4
NOT LIKEs, assuming there is one ?
Thanks in advance,
Chas
possible characters.
Right now I am using for inclusion:
WHERE [tbl].[column] LIKE "*" & "A" & "*"
and for exclusion:
WHERE [tbl].[column] NOT LIKE "*" & "B" & "*"
If it was given that there were up to 7 possible different characters
that could be in this field, what would be the most efficient way to
query for the presence of any number of those 7, while excluding the
remaining possibilities.
For example:
The query will look for fields with any combination of A and/or B
and/or C.
It will need to exclude any fields that have D, E, F, G
The characters could be in this field in any order.
What is a more efficient way than having the query be 3 LIKEs and 4
NOT LIKEs, assuming there is one ?
Thanks in advance,
Chas