Hi,
I have a text field for Employee ID that is all numeric about 85% of the time. I wrote a query to give me all of the IDs that start with a specific number sequence:
SELECT * FROM tblEmployee WHERE EmployeeID LIKE '009*'
and got no results. I KNOW there are employees that start like that because everyone working in a certain business unit starts with that code.
So I changed it to:
SELECT * FROM tblEmployee WHERE EmployeeID LIKE '*009*'
(notice I surrounded the string with *)
And got the results I wanted. Every Employee ID has 009 as the left 3 characters if they are in a specific BU, so why didn't the first one return any results? The field is formatted as text on the table. I trimmed the field and tried the original again but to no avail.
Thanks
-Lee
Jumat, 21 Oktober 2011
[MS_AccessPros] Strange result of query
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar