> > > Now, I want to select only the latest article from each issue in a
> > > single query. Any ideas how I would do this?

Kind of sneaky, but something like this will do it (substitute the relevant
type conversion & string concatenation functions for your DBMS)

SELECT     articleIssueId, articleTitle, articleDate
FROM        myArticles
WHERE    convert(char(16), articleIssueID) + '_' + convert(char(16),
articleID)
IN
    (SELECT convert(char(16), articleIssueID)  + '_' + convert(char(16),
MAX(articleid))
    FROM myArticles GROUP BY articleIssueID)

Nick
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to