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: Newbie: Saving a row

Re: Newbie: Saving a row

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 11 Oct 2002 20:19:15 GMT
Message-ID: <3DA7321E.2C22E579@exesolutions.com>


P B wrote:

> On Fri, 11 Oct 2002 19:58:17 GMT, Daniel Morgan
> <dmorgan_at_exesolutions.com> wrote:
>
> >P B wrote:
> >
> >> I've read a row from a table into a PL/SQL variable, made some change
> >> (including the primary key) and want to insert it back to the table.
> >>
> >> Do I have to list all the 50 columns to do the insertion or I can
> >> insert the row variable in one shot?
> >>
> >> Thanks
> >
> >Without seeing your code I haven't a clue what you mean by read a row
> >into a variable so that answer is ... don't know because I don't know
> >what you did.
> >
> >But likely ... it is that you must name the fields.
> >
> >Daniel Morgan
>
> OPEN cursor_variable;
> FETCH cursor_variable INTO row_variable;
> row_variable.primary_key := new_value;
> row_variable.other_field := other_new_value;
> .
> .
> *** Here I want to insert the whole "row_variable" into my table ***
> is there a better way than :
>
> INSERT INTO table
> VALUES(row_variable.primary_key,row_variable.other_field,...);

Name the fields.

Daniel Morgan Received on Fri Oct 11 2002 - 15:19:15 CDT

Original text of this message

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