Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving the count from a derived SQL
Message
 
 
To
28/03/2010 22:24:30
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01457748
Message ID:
01457767
Views:
22
>>Ok, here are ways of getting what you want:
>>
>>
>>select Temp.NoThread, MessagesPerThread
>> from (SELECT Top 10 NoThread FROM Thread ORDER BY Numero DESC) Temp inner join
>>(select NoThread, count(*) as MessagesPerThread from Thread group by NoThread) CountMessages
>>on Temp.NoThread = CountMessages.NoThread
>>
>
>This works. Thanks

You're welcome.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform