Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 SQL Query - CONTAINSTABLE & ISABOUT
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 10 March 2005 :  19:21:07  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I have the following SQL Query..


SELECT TOP 20 Data.Data_FeedID, Data.Data_Title, Data.Data_Link, Data.Data_Desc, Data.Data_Date, WEIGHT.RANK AS RSSFeedRanking FROM RSS_Feeds_Data Data INNER JOIN CONTAINSTABLE(RSS_Feeds_Data, Data_Desc, 'ISABOUT ("hosting")') WEIGHT ON Data.Data_ID = WEIGHT.[KEY] ORDER BY WEIGHT.RANK DESC


I have a list of words in a string...
tempString = "porno|adult hosting|warez hosting|"

That I would like to make sure is not in the string. I can split out each phrase but unsure where it should be inserted in the above SQL Query.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets

redbrad0
Advanced Member

USA
3725 Posts

Posted - 11 March 2005 :  10:00:25  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Well I figured out it was just using WHERE before the ORDER. It appears my query is doing to much work though trying to make sure it gets only that full word and not part of another word in the query.

Lets say I am using a query trying to filter out the word ASS in the results that are returned. I do not want any article returned that list the word ASS. I know there has to be a better way then the query I am currently running...

quote:

SELECT TOP 20 Data.Data_FeedID, Data.Data_Title, Data.Data_Link, Data.Data_Desc, Data.Data_Date, WEIGHT.RANK AS RSSFeedRanking FROM RSS_Feeds_Data Data INNER JOIN CONTAINSTABLE(RSS_Feeds_Data, Data_Desc, 'ISABOUT ("hosting")') WEIGHT ON Data.Data_ID = WEIGHT.[KEY] WHERE Data.Data_Title<>'% ass %' OR Data.Data_Title<>'% ass.%' OR Data.Data_Title<>'%*****%' OR Data.Data_Title<>'% ass?%' ORDER BY WEIGHT.RANK DESC



Basically what I am trying to do with this query is make sure that article that have the word assistant still show up. So my thought is to first search with a space in front and behind to make sure its a full word and then a space in front with a .!? at the end incase its the end of a sentence. Does anyone have any better suggestions?

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07