How do I convert this query to MS Access?
SELECT * FROM table WHERE (id='11101958' OR number LIKE '%t11101958%' OR name LIKE '%t11101958%') OR (dateofbirth='1958-10-11' AND SUBSTR(name,1,1)='t') ORDER BY name LIMIT 0,10;
I have already found out:
LIMIT 0,10 > TOP 10
dateofbirth='1958-10-11' AND SUBSTR(name,1,1)='t' > dateofbirth=#10-11-1958# AND LEFT(name,1)='t'
What I can't seem to find out is how to have 2 sets of "AND". So basically I have:
SELECT TOP 10 * FROM table WHERE (id='11101958' OR number LIKE '%t11101958%' OR name LIKE '%t11101958%') OR (dateofbirth=#10-11-1958# AND SUBSTR(name,1,1)='t') ORDER BY name;
Also: is it correct that I have to search for mm-dd-yyyy instead of dd-mm-yyyy or yyyy-mm-dd?
Substr(name, 1, 1) = 't'toLEFT(name, 1) = "t"and then go back and change all of your single quotes to double for your string literals.