e.g. data
Name ID
Carmen 123
David 456
Daisy 789
John 431
Leon 670
Simon 553
SELECT ID FROM data WHERE Name LIKE 'D%';
This is a very very common code where SELECT...FROM...WHERE....LIKE....
This will search all the data from data which begin with d
which result is 456 and 789
However I don't know why this function cannot work in my access2000 environment.....
It always can't search the string with % at the end
Which
SELECT ID FROM data WHICH Name LIKE 'DAVID';
result return is david
SELECT ID FROM data WHICH Name LIKE 'DAVI?';
result is david too...
However
SELECT ID FROM data WHICH Name LIKE 'DAVI%';
Result is nothing....
HELP
My company need me finish this project in one week and the deadline is coming.....hi
In access u use * instead of %
so your query must be
SELECT ID FROM data WHERE Name LIKE 'D*';
I wish u finish before ur dead line, tell me if u need anyhelp
Best wishes
Hesham el ebrashy|||that's right, in access u must use * not %.
if u use _ in mssql, u must use ?
for example :
in mssql :
SELECT ID FROM data WHERE Name LIKE 'D_VID';
in acces:
SELECT ID FROM data WHERE Name LIKE 'D?VID';|||Hello,
You can try that :
SELECT ID FROM data WHICH Name LIKE 'DAVI*';
It's the solutions I find in a the next site :
http://www.fgcu.edu/support/office2000/access/queries.html
bye
Sylvie
Quote:
Originally Posted by Kwok
I searched a statement in google which is very common
e.g. data
Name ID
Carmen 123
David 456
Daisy 789
John 431
Leon 670
Simon 553
SELECT ID FROM data WHERE Name LIKE 'D%';
This is a very very common code where SELECT...FROM...WHERE....LIKE....
This will search all the data from data which begin with d
which result is 456 and 789
However I don't know why this function cannot work in my access2000 environment.....
It always can't search the string with % at the end
Which
SELECT ID FROM data WHICH Name LIKE 'DAVID';
result return is david
SELECT ID FROM data WHICH Name LIKE 'DAVI?';
result is david too...
However
SELECT ID FROM data WHICH Name LIKE 'DAVI%';
Result is nothing....
HELP
My company need me finish this project in one week and the deadline is coming.....
No comments:
Post a Comment