creating search engine

J

Jimmy Tran

Hello everyone,

I have one major table that contains some data and contain keys to many
other tables. I am using RIGHT JOIN query method to get all my data and
everything works very well. Now I am using the same query except i have
a bunch of WHERE clauses in it to create a 'search engine', here's a
fake example:
SELECT a.a AS A, b.b AS B, c.c AS C, ..., and so on
FROM a RIGHT JOIN (b RIGHT JOIN C RIGHT JOIN(...so on)
ON a.a=c.c.......and so on
WHERE (a.a LIKE '%searchTerm%') OR (b.b LIKE '%searchTerm%')
OR (b.b LIKE '%searchTerm%')OR (c.c LIKE '%searchTerm%')
....and so on for about 25 WHERE cases total

It works fine and fast when I have about 13 WHERE clauses, but when i
exceed that, my script runs forever. I would like thank you in advance
if anyone could help me out.
Jimmy.
I use asp,vb script, and access97 for my project.
Again, thank you so much.
 
L

ljb

Off the top of my head...this might work

WHERE (a.a & b.b & c.c LIKE '%searchTerm%')

I just had an idea to concatenate all the fields and search them once. Don't
know if it will work though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top