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: PL/SLQ question

Re: PL/SLQ question

From: António Paulo Maio <apmaio_at_mail.REMOVETHIStelepac.pt>
Date: 1997/09/23
Message-ID: <3428424A.B123505B@mail.REMOVETHIStelepac.pt>#1/1

Why not use:

 insert into table_name
  (select field1, field2, ..., new_field37, new_field98, ...    from table_name where ...)

Anders Blaagaard wrote:
>
> I have a table with more than 100 columns, and a want to make a copy
> of
> a row, change a few fields, a put it back into the table (without
> changing the original). The idea is this:
>
> declare
> tmp_row table_name%rowtype;
> begin
> select * into tmp_row from table_name where ...
> tmp_row.field37 := ..
> tmp_row.field98 := ..
> insert into table_name values (tmp_row); -- ILLEGAL
> end;
>
> Can anyone think of an easy way to do this?
>
> Anders Blaagaard
> blaa_at_ifad.dk
Received on Tue Sep 23 1997 - 00:00:00 CDT

Original text of this message

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