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

Home -> Community -> Usenet -> c.d.o.misc -> Re: outerjoin - "where is Second"

Re: outerjoin - "where is Second"

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 27 Sep 1999 11:52:48 +0100
Message-ID: <938430027.3922.0.nnrp-03.9e984b29@news.demon.co.uk>

You lost the 'null row' by joining it to the KEYS table. You need -

>select main.id, addon, title
>from keys, main, title
>where keys.num(+) = main.id
>and title.type = 1
>and main.tid(+) = title.id;

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Gerard van Dorth wrote in message
<938428729.26294.0.pluto.d4ee362b_at_news.demon.nl>...

>select main.id, addon, title
>from keys, main, title
>where keys.num = main.id
>and title.type = 1
>and main.tid(+) = title.id;
>
>We expected the result:
>1, First, Mr.
>2, Second, (null)
>3, Third, Miss
>(like we had in our SQL-server applic (with a different OJ syntax))
>Can someone explain us why the result: "2, Second, (null)" is missing
>running this query on Oracle (7.3.3.xxx) ... and how to query to get what
we
>expected?
>
Received on Mon Sep 27 1999 - 05:52:48 CDT

Original text of this message

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