Re: Keyword searching across 2 tables

From: <rgparkins_at_hotmail.com>
Date: 11 Jul 2006 04:59:22 -0700
Message-ID: <1152619162.693319.81190_at_m73g2000cwd.googlegroups.com>


Hi Bob

Thanks for the reply. Just to confirm I am not a novice (well I like to think so) and am familiar with the like clause and joins etc. My main question was if a user has the following keywords.. "egyptian table" I will need to split these up to do a check on each word, and if there are 100,000 users then thats a lot of queries!

for example select

The other way is to take the actual text and split this up and do a like on all those words on each keyword column of the user table. I hope that makes sense and was after some kind of pointer to a single query that internally does a match across these columns. Is there such a query?

I think I will need to do something like regular expression matching but for each user, meaning lots of queries :(

Again thanks for your reply

Richard

Bob Badour wrote:
> rgparkins_at_hotmail.com wrote:
> > Hi,
> >
> > I have a problem that is possibly been solved but I really need someone
> > to direct me in the techniques for performing this task. I am using SQL
> > Server but thought this is a generic SQL question and the application
> > is a website.
> >
> > I have a table of stock with summary text of type text. I have users
> > who want to be alerted when their keywords are contained in a stock
> > summary when a new stock is added to the database. (A user can have
> > many keywords and they must all be contained in the summary)
> >
> > Here comes my question, do I need to loop through ALL users and loop
> > through each keyword a user has defined? Is there a standard technique
> > for this kind of match?
>
> Yes, it's called a join. You probably want to look up the LIKE keyword too.
Received on Tue Jul 11 2006 - 13:59:22 CEST

Original text of this message