Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | KaptenStarting Member
 
 
                                        1 Post | 
                                            
                                            |  Posted - 2010-02-11 : 05:53:04 
 |  
                                            | Hi,I changed from MS SQL-Server to MS Access and a selectline 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 |  |  
                                |  |  |  |