declare
rCount integer;
j integer;
cursor cur_my_cursor is select * from my_table_name;
tRecordSet cur_my_cursor%Rowtype;
begin
rCount := 0; j:=1;
select count(id) into rCount from my_table_name;
dbms_output.put_line(rCount ' Records to be updated');
open cur_my_cursor; for j in 1..rCount
loop
fetch cur_my_cursor into tRecordSet;
update my_table_name mtn set mtn.unique_key = j
where mtn.field_one = tRecordSet.field_one
and mtn.field_two = tRecordSet.field_two
and mtn.field_three = tRecordSet.field_three
and mtn.field_four = tRecordSet.field_four
and mtn.field_five = tRecordSet.five;
dbms_output.put_line('Record id ' tRecordSet.field_one ' has been associated with an unique key of ' j );
end loop;
close cur_my_cursor; end;
Wednesday, October 31, 2007
Update set of tuples with new values : Oracle
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
No comments:
Post a Comment