the trouble with OR
Posted in 1991
Path: emory!swrinde!elroy.jpl.nasa.gov!ames!ncar!uchinews!quads!admn
From: admn@quads.uchicago.edu (Bonnie J. Black)
Newsgroups: comp.databases.informix
Keywords: Help!
Message-ID: <1991Nov14.230943.26485@midway.uchicago.edu>
Date: 14 Nov 91 23:09:43 GMT
Sender: news@uchinews.uchicago.edu (News System)
Organization: Bulletin of the Atomic Scientists
Originator: admn@midway.uchicago.edu
I am having trouble in Informix-SQL. I have an acereport which generates
a list of mailing labels for something we're sending out. I want to change
it so that it also includes my own name and address as well as another name
and address for someone else in this office. We are adding ourselves to
the list so that we can check up on the mailing house and see that they get
the thing out in a timely fashion and that it is done correctly. My problem
is this: these two names we want to enter exist in the main table of the
database but nowhere else. The program works just fine when I use the old
version which does not include the two additional names. These two additional
names do not conform to the conditions of the where clause, so they have to
be specified separately. What I have tried is to add them in as follows:
select LIST from TABLES
where (JOINS and
CONDITIONS)
or account = "ACCOUNT ON MY ENTRY"
or account = "ACCOUNT ON THE OTHER ADDITIONAL ENTRY"
If I run it with only the first three lines, it runs beautifully. When
I add the last two lines, it fails miserably. I realize that using
"OR" is expensive from a performance point of view, but I didn't expect
it to make this select fail entirely. If you can help me solve this
problem, you'll be helping me solve several others as well.
Thanks,
--
Bonnie J. Black (admn@midway.uchicago.edu)
The Bulletin of the Atomic Scientists (but looking for work in Pittsburgh)
(312) 702-2555 (9-5 CST)
--
Bonnie J. Black (admn@midway.uchicago.edu)
The Bulletin of the Atomic Scientists (but looking for work in Pittsburgh)
(312) 702-2555 (9-5 CST)