Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Right panel - wrong order of last 10 replies
Message
From
21/07/2010 14:36:43
 
General information
Forum:
Level Extreme
Category:
Other
Miscellaneous
Thread ID:
01473173
Message ID:
01473343
Views:
51
This message has been marked as the solution to the initial question of the thread.
>Please see attached - looks like you forgot to order result in DESC order.

When we changed it to WHERE EXISTS, I forgot to add another ORDER BY:
DECLARE @NoMember Integer

SET @NoMember=1

SELECT Thread.Numero,Thread.Title,Thread.Url,Thread.AddDate 
FROM Thread (NOLOCK) 
WHERE EXISTS 
(SELECT 1 FROM (SELECT TOP 10 Reply.NoThread FROM Reply (NOLOCK) WHERE Reply.NoMember=@NoMember ORDER BY 1 DESC) Temp
 WHERE Temp.NoThread=Thread.Numero)
  ORDER BY 1 DESC
It should be ok now. This might require a login however.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform