How do I sort the query results by keyword occurrence in column? I'm using SQL Server 2008 with Full-text indexing.
views:
308answers:
2
A:
select * from tablename order by columnname
Is that what you're looking for?
Ian Devlin
2009-01-07 10:16:58
No, I meant the keyword occurrence, for example, if this keyword is "car", record A contains 3 occurrence and record B has 5, then record B should rank higher.
2009-01-07 10:31:21
+1
A:
select columnname, count(columnname) as cnt from tablename group by columnname order by count(columnname) desc
kedar kamthe
2009-01-07 12:23:25