quan
Thu Nov 06 02:05:55 CST 2003
Hi,William Sanders,
I think that yr method won't work, Mike Farnesi not means that, I think we
can do it by the following method:
Select X.page from tablename X where Exist (Select * from tablename y on
x.page=y.page and y.word="world") and;
Exist (Select * from tablename Z on X.page=Z.page and Z.word="health")
and;
Exist (Select * from tablename T on x.page=T.page and T.word="manager")
into cursor result_curs
Does this work?
wish u luck!
Chuen
"swdev2" <wsanders.bob@bob.efgroup.com> дÈëÓʼþ
news:uM2cKrCpDHA.2216@TK2MSFTNGP12.phx.gbl...
> How about this one ?
>
> select page from tablename into cursor curs_results where word in
> ("world","health","manager")
>
> lemme know? mondo regards [Bill]
> --
> William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
> email.
> FREE LONG DISTANCE -> mailto:excel-info@efgroup.net
> Free Satellite Receivers and installation ->
>
http://www.vmcsatellite.com/?aid=58456
> mySql / VFP / MS-SQL
> "Mike Farnesi" <mfarnesi@hotmail.com> wrote in message
> news:26d24e2e.0311052039.4f5e9d7b@posting.google.com...
> > I have created a table ( word c(10), page n(5) ) thats contains all
> > the words in a book and the page number.
> >
> > I have an index on 'word'.
> >
> > I have picked 3 words:
> >
> > w1="world"
> > w2='health"
> > w3="manager"
> >
> > I need a SQL command that will return a result table (page n5) of all
> > the pages that contains ALL of the 3 words. (fully optimized is my
> > goal).
> >
> > (my current solution starts by 'select'ing out 3 tables with the
> > intermediate 'page' number tables, but this is not very efficient.)
> >
> > Can someone think of a good SQL to accomplish this 'intersection' SQL.
> >
> > THX
> > Mike Farnesi
>
>