Hi,
I changed from MS SQL-Server to MS Access in an application and a SQL-select statement stoped to work.
Here is the code:
"SELECT TblContact.*,(select top 1 cs.sendTime FROM TblContactSent cs WHERE TblContact.contactId = cs.contactId ORDER BY cs.sendTime DESC) as ST from tblContact ORDER BY ST DESC"
I know Access can't use alias in the order by clause so I changed that to ORDER BY 5 DESC. No error but it doesn't sort by sendTime.
I would highly appreciate any help. I've been looking for a solution for days. Either that it can't be done or (preferable) how to solve it.
Thanx in advance!
Kapten
I changed from MS SQL-Server to MS Access in an application and a SQL-select statement stoped to work.
Here is the code:
"SELECT TblContact.*,(select top 1 cs.sendTime FROM TblContactSent cs WHERE TblContact.contactId = cs.contactId ORDER BY cs.sendTime DESC) as ST from tblContact ORDER BY ST DESC"
I know Access can't use alias in the order by clause so I changed that to ORDER BY 5 DESC. No error but it doesn't sort by sendTime.
I would highly appreciate any help. I've been looking for a solution for days. Either that it can't be done or (preferable) how to solve it.
Thanx in advance!
Kapten