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 -> Update in a dynamic process

Update in a dynamic process

From: arnaud herve <dillonais_at_wanadoo.fr>
Date: Sun, 13 Oct 2002 10:51:15 +0200
Message-ID: <aobc3g$t37$1@news-reader11.wanadoo.fr>


I've a table T like that
X Y



A NULL
NULL C
D E
F NULL My Problem.
I want to replace values equal to NULL by the value which follow them In my case, I'll get.
A C
D C
D E
F NULL
I used a curosr but how to make a dynamic update?

according to me,It would be like



.........
for i in 1..sql%rowcount-1 loop
if X is null
update T set X = select X from T
where rownum = i+1;
end loop;
..........

it's a sample of code, I know a dirty code, but simply to show you, what I want to get. Received on Sun Oct 13 2002 - 03:51:15 CDT

Original text of this message

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