I'm stuck on a sql select problem.
I write my own forum and for the main subject index page I want to display the name of each subject, and for each subject I want to display the latest thread:
Latest post by Jim Bratt: Is my car any good?
Latest post by Lucy Hawthorne: What's wrong with my Boeing?
Therefore, I need to do a select in order to find each subject, and then a select top 1...order by subitteddate DESC to find the latest post of each subject. Somehow, these should end up on the same datarow of course.
I've tried various approaches (WHERE...IN, joins, DECLARE AS TABLE) but can't figure it out.
View Complete Post