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: P B <pbeliveau_at_avcorp.com>
Date: Fri, 11 Oct 2002 16:17:46 -0400
Message-ID: <n5cequ4ju0tth3s8lsdrg4ssueek87pcmj@4ax.com>


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,...); Received on Fri Oct 11 2002 - 15:17:46 CDT

Original text of this message

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