Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: [URGENT] conditional outer join?

Re: [URGENT] conditional outer join?

From: Jim Davis <jimdavis_at_iprolink.ch>
Date: Mon, 14 Aug 2000 14:47:57 +0200
Message-ID: <8n8q4u$pkm$1@news1.urbanet.ch>

Why not something like:

SELECT blah-blah FROM a

    WHERE NOT EXISTS (SELECT id FROM b WHERE b.id = a.id) UNION
SELECT blah-Blah FROM a,b

    WHERE a.id = b.id AND b.date = somedate

--


Jim Davis
Informatique Ressources Humaines




--


Jim Davis
Informatique Ressources Humaines


"GF" <GAYLEN.FRALEY_at_MAIL.SPRINT.COM> a écrit dans le message news:
8n10n2$iol$1_at_nnrp1.deja.com...

> I have a situation that I would describe as needing a Conditional Outer
> Join. The situation is concerns 2 tables. Table A has unique records
> in it. Table B may or may not have a matching record. No problem. I
> can use where a.id = b.id (+) . However, if table B has a record, then
> I need to check the value of a certain other variable for compliance.
> If compliance is met, then I need to include the record. I am using an
> Oracle database with Concur Technologies Seeker HR product. I mention
> this because I am constrained from making one table to feed another,
> etc. It is not impossible, but not convenient to code, as these
> queries are dynamic and change with many users. This is inline code
> that works within Concur's own script language. Basically I have to
> use existing tables to pass SQL code directly to Seeker and then Seeker
> handles the output. So, using pseudo code, it would look like this:
>
> If exists(a.id & b.id & b.date = somedate) output;
> else if exists(a.id) & !exists(b.id) output;
>
> Please reply to my e-mail address as this is really urgent. Thanks in
> advance for any and all help!
>
> gaylen.fraley_at_mail.sprint.com
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Aug 14 2000 - 07:47:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US