Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nizmaylo
Constraint Violating Yak Guru
258 Posts |
Posted - 2001-08-28 : 14:32:30
|
| In the select statement belowSELECT TOP 50 S.ItemID, I.Title, DatePosted=Convert(varchar, I.DatePosted, 101), I.URL, Rating=Count(*)FROM #SearchResults S, vActiveItems IWHERE S.ItemID = I.ItemIDGroup by S.ItemID, I.Title, I.DatePosted, I.URLOrder by 5 DESC, 3 DESCgraz returns results of TOP 50 ranked articles.Let's say I would like to add another column to the temp table called CHAPTER and populate it with ADMINISTRATION, DEVELOPER, GENERAL, etc.How do I return TOP 50 FOR EACH CHAPTER without using a cursor and another temp table ???helena |
|
|
|
|
|