I'm using MS FTS (Full Text Search) Service on MS-SQL2K. For some reason, I can't seem to get this query to work for me. I have a products table of computer related hardware, sorted out by Category_id (i.e - hp5l and hp6l have a category_id of 6 which is "laser printers"). I want to output a FTS query (using containstable), but to output only a maximum of 2 records PER CATEGORY_ID. The FTS query is working great, it's just the distinct issue causing me problems: SELECT Product.Product_id,Product.Product_title,Product.Category_id FROM Product INNER JOIN CONTAINSTABLE(Product,*,SearchTerm,10) AS Ranking ON Product.Product_id=Ranking.[key] LEFT JOIN Category ON Product.Category_id=Category.Category_id WHERE Product.Product_status IS NOT NULL ORDER BY [login to view URL] DESC I need a TSQL query to output a sorted FTS (based on the above query) by rank (desc) and then, "grouped" by Category_id. Very similiar to what Google does on this link: [login to view URL] (Notice that ONLY the first 2 results come from [login to view URL]) Anyone who knows SQL, that should be easy for you (I guess), I will post perfect feedback on whoever can get this working by tommorow. Let me know what's your bid too, and if you need more information. Thanks! Michael.
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
## Platform
Win2K,SQL2K
## Deadline information
I can beta test and debug your query as I have enough content to try it on. Do not forget to optimize this as much as possible.