B
Bernd Muent
Hi together,
I've got an Access Database with questions and answers for pupils, f.e.
"11*7" and "11+7".
Now I like to find all questions with multiplication sign "*",
especially "11*7".
I started with:
select question from tasks where question like "*11*7*",
but it finds "11*7" and "11+7". As expected.
I tried with a double "**":
select question from tasks where question like "*11**7*"
The same result.
Next idea with chr(42):
select question from tasks where question like "*11"&chr(42)&"7*"
Still the same result
Workaround:
select question from tasks where (question like "*11*7*") and
(instr(question,'*')>0)
Works fine. It finds only "11*7".
But it is not really ok, because it would also find:
11+7*3
Has anybody a better idea?
Thank you for tips, Bernd
I've got an Access Database with questions and answers for pupils, f.e.
"11*7" and "11+7".
Now I like to find all questions with multiplication sign "*",
especially "11*7".
I started with:
select question from tasks where question like "*11*7*",
but it finds "11*7" and "11+7". As expected.
I tried with a double "**":
select question from tasks where question like "*11**7*"
The same result.
Next idea with chr(42):
select question from tasks where question like "*11"&chr(42)&"7*"
Still the same result
Workaround:
select question from tasks where (question like "*11*7*") and
(instr(question,'*')>0)
Works fine. It finds only "11*7".
But it is not really ok, because it would also find:
11+7*3
Has anybody a better idea?
Thank you for tips, Bernd