The goal is to select children based on a distinct parent id. Example of the sql code:
SELECT f.ForumTitle, (SELECT Max(p.PostDateTime) FROM tbl_Posts p WHERE p.Forum_ID = f.Forum_ID) as MaxPostDateTime FROM tbl_Forum f ORDER BY MaxPostDateTime DESC I would like to be able to accomplish this query in OJB getting Forums ordered by the most recent posts to that Forum. I thought it would be possible to do a Query first on the Posts table to get all Posts distinct by Forum_ID, but I don't see a way of doing that with OJB's Query syntax. Best Regards, Jacob --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]