Thread: insert values from a ROW object
for a in select * from temp_rslt
loop
insert into final_rslt select row(a.*);
end loop;
I want to do something like the above. I don't want to have to name each 'a.' variable.
Is it possible?
TIA
Mike
by the way, the row structure of temp_rslt and final_rslt are identical.
On Thu, Sep 22, 2016 at 2:42 PM, Michael Moore <michaeljmoore@gmail.com> wrote:
for a in select * from temp_rsltloopinsert into final_rslt select row(a.*);end loop;I want to do something like the above. I don't want to have to name each 'a.' variable.Is it possible?TIAMike
for a in select * from temp_rsltloopinsert into final_rslt select row(a.*);end loop;I want to do something like the above. I don't want to have to name each 'a.' variable.Is it possible?
INSERT INTO final_rslt VALUES ( (a).* );
David J.
Michael Moore schrieb am 22.09.2016 um 23:42: > for a in select * from temp_rslt > loop > insert into final_rslt select row(a.*); > end loop; > > I want to do something like the above. I don't want to have to name each 'a.' variable. > Is it possible? > No need for a loop: insert into final_rsl select * from tmp_rslt; This assumes that both table define the columns in the exact same order
Thanks David.
Thomas, Yes, in my example the loop is not necessary, but in my real application it is. :-) Thanks.
On Thu, Sep 22, 2016 at 2:55 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
for a in select * from temp_rsltloopinsert into final_rslt select row(a.*);end loop;I want to do something like the above. I don't want to have to name each 'a.' variable.Is it possible?INSERT INTO final_rslt VALUES ( (a).* );David J.