Re: Query Help!!
Posted in 1992
In article <8810@emory.mathcs.emory.edu> A.Heskett@bnr.co.uk (Tony Heskett) writes:
->
->neal.l.leitner writes:
->
->> select file_no from xyz
->> where text = "MURDER"
->> INTO TEMP T1;
->>
->> select file_no from xyz
->> where text = "MYSTERY"
->> INTO TEMP T2;
->>
->> select t1.file_no from t1,t2
->> where t1.file_no=t2.file_no;
->>
->> *This is faster, but as fast as I would like to have it run.
->
What about
select file_no from xyz
where text in ("MURDER", "MYSTERY")
group by file_no
having count(*) >= 2
->If you can, is that slower/faster ? (sorry, I don't have 130,000
->rows to play with at the moment :-)
Sorry, too, I didn't have the time to test the above.
Well, maybe it helps or shows an alternative. :-/
->Or is the point that they can pick lots of keywords (in which
->case I probably blew it completely) ? If so, you might UNION
->all the individual SELECTs into a temp table and then self-join
->that.
In that case you'd have to apply an array and a variable for the
WHERE resp. the HAVING clause.
->Good luck ...
->
From me as well.
->PS. It's bucketting down with rain. Does anyone have a spare warm-climate
-> job ?
->Tony Heskett th@bnr.co.uk Voice: (+44) 279 402637
I thought, British get a tan by sitting in the British rain??? :-)
[ (c)Beatles ]
--
Sebastian v. Bomhard <svb@guug.de> Mathematiker und EDV-Journalist
St.-Anna-Str. 13, D-W-8000 Muenchen 22 (Lehel), +49-89-298934