I've got the following query:
Which works perfectly under MSSQL, but I get a problem with the ORDER BY part when I fire it at a MSAccess..Code:SELECT a.MyID ,(SELECT MAX(b.MyDate) FROM MyTable2 b WHERE b.MyID=a.MyID) AS MyDateField FROM MyTable1 f ORDER BY (SELECT MAX(b.MyDate) FROM MyTable2 b WHERE b.MyID=a.MyID) DESC ,a.MyID DESC
Doesn't MSAccess (or JET-engine) support a subquery based field in the order by, or am I doing something wrong?




Reply With Quote