[thelist] SQL In need of Optimization....

rudy r937 at interlog.com
Fri Jun 29 09:24:07 CDT 2001


replying to my own post again [sheesh]

>   select obladi, oblada
>     from tblCollegeSearch
>   where CollegeID in
>      ( select CollegeID , count(*)
>           from tblCollegeMajors
>         where MajorID in ( #majorList# )
>         group by CollegeID
>           having count(*) >= #X# )

the subquery should return only the CollegeID -- fundamental syntax error
to have more than one column if the subquery is used for an IN test

anthony, if you ask me now to generate the hit count (how many majors does
each college offer from among the ones that were checked off), that's a lot
harder and it's too nice a day for heavy sql...

rudy





More information about the thelist mailing list