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

Home -> Community -> Usenet -> c.d.o.server -> Re: Design question

Re: Design question

From: Radu Lascae <r.nospam.lascae_at_wanadoo.nl>
Date: Sat, 13 Oct 2001 10:49:15 GMT
Message-ID: <L_Ux7.29$vT3.22@castor.casema.net>


Not really sure what you're looking for, just guessing:

create view aview
(cust_id, name) as
select cust_id, name_first name from cust union
select cust_id, name_last name from cust union
select cust_aka_id cust_id, name from cust_aka;

Use as : select * from aview order by cust_id.

HTH,
Radu

"Jim Poe" <jpoe_at_fulcrumit.com> wrote in message news:9q7dmc$dat_at_dispatch.concentric.net...
> I have two tables:
>
> Create table CUST (
> Cust_id number(10),
> Name_First varchar2(10),
> Name_Last varchar2(15));
>
> Create table CUST_AKA(
> Cust_Aka_Id number(10),
> Name varchar2( 15 ),
> Cust_Id number(10));
>
> I would like to create a view with Cust_Id, Name.
>
> For any Cust_ID, the view would consist of 2 or more rows. One where Name
=
> Cust.Name_First, one where Name = Cust.Name_Last, and one row each for all
> values in Cust_AKA.Name.
>
> What would be the most efficient way to accomplish this?
>
> Thanks
>
> --
> Jim Poe (jpoe_at_fulcrumit.com)
>
>
Received on Sat Oct 13 2001 - 05:49:15 CDT

Original text of this message

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