[thelist] trouble w/ JOINs in an Oracle query

Jeremy Weiss eccentric.one at gmail.com
Thu Oct 1 09:45:48 CDT 2009

On Thu, Oct 1, 2009 at 7:12 AM, r937 <rudy at r937.com> wrote:
>> The above query works great except that it only returns rows
>> when both columns exist, as it rightly should since it's an
> then try LEFT OUTER JOIN    ;o)

Doh! I knew I forgot something. :)
Actually, I tried. But, I didn't put the conditions in the JOIN
statement like you did.

Anywho, tested the query you sent. It appears to be totally ignoring
the condition on i.costworkordercustomer. I tried a few things but the
result was always either
  ignore i.costworkordercustomer
  acting the same as before (meaning not all the rows were appearing
that I wanted)

I'm thinking, since both of the fields that I'm SELECTING are coming
from the same table and I'm wanting one to always appear even if the
other doesn't, should I be joining the table back to itself in
addition to joining it to the other tables? In my finite little mind,
it makes sense. But I've been unable to get that to work either.

Oh, and good tip on placing the most restricted table first in the FROM clause.


More information about the thelist mailing list