Hi i wish to only display the top 10 distinct 'SearchStr'.
How can i do this as i have to display the 'SearchResultid' in the Select statment to get the OrderBy to function.
This is my current SQL:
I read somwhere that i should use the ON Clause but it just errors for me:
-Gus
How can i do this as i have to display the 'SearchResultid' in the Select statment to get the OrderBy to function.
This is my current SQL:
Code:
SELECT DISTINCT TOP 10 SearchStr, SearchResultID
FROM SearchResult
WHERE (SearchBroad = 0) AND (Hits > 5)
ORDER BY SearchResultID Desc
I read somwhere that i should use the ON Clause but it just errors for me:
Code:
SELECT DISTINCT TOP 10 [COLOR=red]ON(SearchStr)[/color], SearchResultID
FROM SearchResult
WHERE (SearchBroad = 0) AND (Hits > 5)
ORDER BY SearchResultID Desc
-Gus