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: question on view

Re: question on view

From: Yar <yarsegal_at_my-deja.com>
Date: Wed, 22 Sep 1999 16:26:14 GMT
Message-ID: <7savuj$g2q$1@nnrp1.deja.com>


  pradeep paudyal <pradeep_at_evolv.com> wrote:
> hello,
> I have a table which has fields called 'fid' and 'type'.
> I have another table which has fields 'fid' and 'name'.
> I want to create a view such that all the fid from the first table are
> listed with the name( if they have it ).In other words the second
> table has only fids which have names.
> But I want to have everything in the view and leave the 'name' field
> empty if a 'fid' doesn't have it.
> I coudn't think of how I can do it. Any help would be appreciated.
> Thanks
> Pradeep
>

You need to do an outer join, for example,

select a.fid, b.name
from a, b
where a.fid = b.fid(+)

Hope this helps.

Yar

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Sep 22 1999 - 11:26:14 CDT

Original text of this message

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