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 |
|
daddio2005
Starting Member
4 Posts |
Posted - 2005-12-20 : 10:28:11
|
| I have a table that contains a memo field which has lots of information in it. I wish to search through each row in that table and return of count of how many times a word occurs for each row.I know the COUNT() function counts the number of rows but I need to count the number of occurances in each row.Basically the table contains page names and page content. Upon deciding on a keyword to search for, I want to return all page names that have that word in the content and ORDER IT BY DENSITY/RELEVANCE.Any ideas on the SQL statement would be appreciated. This needs to run on a webpage and be able to be run on an access database.thanks |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2005-12-20 : 17:02:55
|
| http://www.sqlteam.com/searchresults.asp?SearchTerms=keyword+searchMichael<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda> |
 |
|
|
daddio2005
Starting Member
4 Posts |
Posted - 2005-12-21 : 03:56:47
|
| Dont think this will run on an access database will it?If not and it has to be SQL SErver, I am very new to SQL server so a step by step guide would be good! Thanks.I am only using enterprise manager to view my sql server databases.Cheers. |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2005-12-21 : 11:43:40
|
| You'd have to "port" this concept to Access, but I don't see any reason why this wouldn't work. I'm not sure I'd use Access for any "big" keyword search type things though.Michael<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda> |
 |
|
|
|
|
|