Re: Query Help

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: Wed, 16 Jan 2008 18:13:46 -0800 (PST)
Message-ID: <c0d901b2-08d8-4fb1-9e40-9801d8060baa@z17g2000hsg.googlegroups.com>


On Jan 16, 7:29 pm, spamb..._at_milmac.com (Doug Miller) wrote:
> In article <ca0b7d13-f686-4233-8700-13316c17c..._at_e25g2000prg.googlegroups.com>, Charles Hooper <hooperc2..._at_yahoo.com> wrote:
>
> >If you are famailar with BASIC programming, a similar construct might
> >look like this:
> > IF (AGE <> 65) OR (AGE =3D 65 AND RETIRED =3D "Y") THEN
>
> There's no point in examining AGE in the second clause.
> IF (AGE <> 65) OR (RETIRED = "Y") THEN
> has exactly the same effect.
>
> --
> Regards,
> Doug Miller (alphageek at milmac dot com)
>
> It's time to throw all their damned tea in the harbor again.

You are correct, I probably should have continued the discussion to simplify the pseudo code. However, my response was intentially constructed that way to demonstrate to the OP how one might translate a generic written requirement into basic pseudo code, and from there into a WHERE clause.

The OP wrote:
"I would like to find all instances where the Food_ID does not have a Cat_ID of 30 or has a Cat_ID of 30, but it is Inactive. In the example
shown above, I would see Food_ID of 302, but not 301."

Unfortunately, my pseudo code headed in the wrong direction, as pointed out in a later post by the OP.

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. Received on Wed Jan 16 2008 - 20:13:46 CST

Original text of this message