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: %rowtype

Re: %rowtype

From: jim agans <jwagans_at_yahoo.com>
Date: 16 Sep 2003 11:29:30 -0700
Message-ID: <82659da6.0309161029.6de2fecd@posting.google.com>


I did try this...it didnt work....and dont ask why I am doing this....ask the project leader who lets folks make major changes mid stream
you never finish!!!!!!!!!!!

Daniel Morgan <damorgan_at_exxesolutions.com> wrote in message news:<1063238396.146104_at_yasure>...
> jim agans wrote:
>
> >Hi,
> > I have 2 tables defined exactly the same...is there a way I can use
> >the %rowtype to facilitate this process?
> >
> > -- define record type
> > --
> > R_ccc_1 CCC_1%ROWTYPE;
> > --
> > -- insert this customer in to CCC_2 from CCC_1
> > --
> > SELECT(*) -- I need all the fields from here can I cheat and
> >not put all fields in a list?
> > INTO
> > R_ccc_1
> > from CCC_1
> > WHERE CCC_1.CUSTOMER_NUMBER = V_CUST_NUMBER;
> > --
> > -- then insert in to the ccc_2 table
> > --
> > INSERT INTO
> > CCC_2
> > VALUES
> > (R_CCC_1); -- can this be done?
> >
> >
> Why didn't you just try it?
>
> And why in a relational database would you have two tables with the
> exact same column definitions? Did someone miss the lecture on
> normalizing data? ;-)
Received on Tue Sep 16 2003 - 13:29:30 CDT

Original text of this message

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