Re: SQL question

From: Merci <msmith_at_whi.org>
Date: Wed, 5 Nov 2003 11:00:18 -0800
Message-ID: <bobhc4$s1k$1_at_lists.fhcrc.org>


[Quoted]  select a.num, a.let, decode(b.num,null,'NULL')  from a, b
 where b.num(+) = a.num
 and b.let(+) = a.let
 and b.num is null

"az5" <az5_at_telus.net> wrote in message news:KfWpb.9898$6A4.9774_at_edtnps84...
> select a.col1,a.col2, null col3 from a
> where not exists (select null from b where b.col1=a.col1 and
b.col2=a.col2)
>
> regards az5
>
> "Alex" <alexsm_at_eudoramail.com> wrote in message
> news:29ff93bc.0311041324.2a524f3b_at_posting.google.com...
> > Hi ALL
> >
> > I've two tables and am trying to apply an OUTER JOIN on multiple fields.
> >
> > Table A has some rows as:
> >
> > <Table A>
> > --- ---
> > 1 a
> > 1 b
> > 2 b
> > 3 a
> > 3 c
> >
> > Table B is missing some of the rows.
> >
> > <Table B>
> > --- ---
> > 1 a
> > 2 b
> > 3 c
> >
> >
> > Looking for only those rows Table B is missing:
> >
> > ----------
> > 1 b NULL
> > 3 a NULL
> >
> >
> > The following is not working:
> >
> > select t1.number, t1.letter, t2.number, t2.letter
> > from TableA t1, TableB t2
> > where t1.number = (+)t2.number
> > and t1.letter = (+)t2.letter
>
>
Received on Wed Nov 05 2003 - 20:00:18 CET

Original text of this message