[thelist] Problem with SQL Intersect query
rudy
r937 at interlog.com
Sun Jan 6 09:09:58 CST 2002
>So if the table has authors and I ask for all records
>where author is "A" union all records where author is
>"B" etc, I get the correct records.
>
>With intersect used as a subsetting condition
>(exclusion) they cannot be composed with more than a
>single intersection.
hi joel
patient: doc, it hurts when i do that
doctor: so don't do that
INTERSECT as a set operator is all fine and good but not if you can't get
it to work, eh?
i can't tell from your description what's wrong, i'd have to see the sql
of course, there were ways of doing these sorts of things before these set
operators were added to sql, so one option is to code it up the old way
for example,
> records where author is "A"
> union all
> records where author is "B"
could be done with
where author in ("A", "B")
;o)
rudy
More information about the thelist
mailing list