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

rudy r937 at interlog.com
Fri Jun 29 12:28:38 CDT 2001


hi john

thanks for the kind words

i don't think you can do this --

>WHERE (articleid,relevance) IN
> (SELECT articleid,count(*) as relevance

as i said when i corrected myself earlier, it's a fundamental syntax error
to have more than one column if the subquery is used for an IN test -- at
least, that's how i remember it, but of course, that's only my
school-of-hard-knocks experience talking, all of which was gained working
with SQL-86 and SQL-92 databases

it may now be possisble to do it your way in SQL-99, which has really gone
a long way towards implementing orthogonality and other mathematical stuff
that i can barely understand...

anyhow, i think you can still do your query, though, even with the HAVING
relevance>1 in the subquery -- just remove the relevance from the SELECT
list of the subquery, so that the subquery returns only the articleid
column


rudy






More information about the thelist mailing list