returns 1 record sorted by desc to created a single query
SELECT nfCategory.nfCategoryId, nfCategory.Name, nfCategory.Description,
COUNT(nfCategory.nfCategoryId) AS TopicCount,
nfForumMessage.MessageDate
FROM nfForumMessage INNER JOIN
nfForumTopic ON nfForumMessage.nfForumTopicId =
nfForumTopic.nfForumTopicId RIGHT OUTER JOIN
nfCategory ON nfForumTopic.nfCategoryId =
nfCategory.nfCategoryId
GROUP BY nfCategory.nfCategoryId, nfCategory.Name, nfCategory.Description,
nfForumMessage.MessageDate
ORDER BY nfForumMessage.MessageDate DESC
The above returns
1 Category1 1 19/03/2004 4:10:00 pm
1 Category1 1 19/03/2004 4:12:00 pm
2 Category2 1 null
3 Category3 1 null
4 Category4 1 null
When it should return this
1 Category1 2 19/03/2004 4:12:00 pm
2 Category2 1 null
3 Category3 1 null
4 Category4 1 null
Regards
Andrew Scott
Technical Consultant
NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205
Phone: 03 9686 0485 - Fax: 03 9699 7976
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
