Expand|Select|Wrap|Line Numbers
- SELECT *
- FROM tblnews
- WHERE (news_catID = 1) AND (NOT EXISTS
- (SELECT TOP 5 *
- FROM [tblnews]
- WHERE news_catID = 1
- ORDER BY [news_pubdte] DESC, [news_priority] ASC))
- ORDER BY news_pubdte DESC, news_priority
Expand|Select|Wrap|Line Numbers
- SELECT TOP 5 *
- FROM [tblnews]
- WHERE news_catID = 1
- ORDER BY [news_pubdte] DESC, [news_priority] ASC)
Expand|Select|Wrap|Line Numbers
- SELECT *
- FROM tblnews
- WHERE (newsID NOT in
- (SELECT TOP 5 *
- FROM [tblnews]
- WHERE news_catID = 1
- ORDER BY [news_pubdte] DESC, [news_priority] ASC))
I think that there needs to be a combination of the two, but am unsure about how to go about it. Any help for a hopeless newbie would be appreciated.