Re: Exclusion list in a query-by-example
Posted in 1997
Jacob Salomon <jake@apparel.net> wrote: :Jacob Salomon (that's me) wrote: :--SNIP-- :>OK, so much for the preliminaries. Now I want query on all states NOT :>in that list. i.e. the constructed WHERE clause of the query would be: :>WHERE state NOT in ("NY", "NJ", "MN"). I believe what I am looking for :>is called an EXCLUSION LIST :> :>Is there any way for a user to enter exclusion list/pattern on the :>query form? :>--SNIP-- :> Thanks for any ideas. Even thanks for definite NO. :Thanks to XXXXX@YYYYYYYY.ZZZ who supplied me with the definitive *no*. :I have blanked out the person'n e-mail addr - If he had wanted it :posted, he would have done so. It's true that it's a definitive *no* if you use the construct statement and do nothing else. The construct statement will however genereate "state in ('NY', 'NJ', 'MN')" if the user types NY|NJ|MN in the field. What we have done is to have some extra way for the user to indicate that this is an exclusion (it may be a function key, a menu selection or some such). Than we modify the generated where clause programatically to include the not (after the user have left the construct statement). You may not find it pretty, and it isn't allways easy if there are many fields that may be include or exclude but it is possible in some special cases. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org