TSQL Challenge 69 - Find the most relevant advertisement based on keywords – Part 2
A website wants to display most relevant ads on each of its web pages based on the keywords associated with each page. Your job is to write a TSQL query that returns the advertisements most relevant to each web page given in the source table.
This challenge is Version 2 of the TSQL Challenge 66. This version needs to look at the position of the keyword to decide the importance of that keyword. So a page with keywords: "Backup, Compression, SQL Server" should assign a higher relevance to an advertisement having "Compression, Backup" than "SQL Server, Compression".
http://beyondrelational.com/puzzles/challenges/103/find-the-most-relevant-advertisement-based-on-keywords-part-2.aspx