The solution: more subqueries!!
select * from (
select t.*, (
select top 1 ID
from Message
where ParentThreadID = t.ID
order by DateCreated desc
) as MessageID
from MessageThread t
) tm
left join Message m on tm.MessageID = m.ID
This should get you all the columns with two nested queries.
Blorgbeard
2010-04-13 21:06:07