Gerry Snyder <[EMAIL PROTECTED]> wrote: > Igor Tandetnik wrote: > > Sergey M. Brytsko <[EMAIL PROTECTED]> > > wrote: > >> But what about the following values: > >> > >> 1 1 2 2 100 100 100 100 100 100 100 100 100 100 100 111 111 > > > > If you susptect your data is likely to look like this, you may want to > > rewrite your query as > > > > SELECT BBB FROM XXX WHERE BBB < 100 > > union all > > SELECT BBB FROM XXX WHERE BBB > 100; > > > > > Wouldn't this work as well?: > > SELECT BBB FROM XXX > except > SELECT BBB FROM XXX WHERE BBB = 100; >
This gives a different answer because the EXCEPT operator makes the rows of the result set unique. So the result set will be: 1 2 111 where as formerly it was 1 1 2 2 111 111 -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------