| how to fetch two times the same explicit cursor:first make a total,second divisions by total [message #571408] |
Sun, 25 November 2012 12:01  |
 |
garciala
Messages: 3 Registered: November 2012
|
Junior Member |
|
|
Hi,
I need to open an explicit cursor for making a total: after I have to use the same information of that explicit cursor for dividing a column of the cursor by that total. It is not enough to open close, reopen and reclose because I just obtain one register at the same time and it is the same register two times consecutively.
I don't want to use auxiliary structures cause there are 18000 columns for 10200 rows.
Any ideas?
Thanks beforehand.
FOR i IN 300..300 --18000
LOOP
y:=ymax-ysize*(i+0.5);
FOR j IN 200..500 --10000
LOOP
x:=xmin+xsize*(j+0.5);
pixel:=SDO_GEOMETRY(2001,4326,SDO_POINT_TYPE(x,y,NULL),NULL, NULL);
OPEN HumRel(x,y,pixel);
FETCH HumRel INTO hr,dist;
WHILE HumRel%FOUND LOOP
EXIT WHEN HumRel%NOTFOUND;
--sum the total of dist
FETCH HumRel INTO hr,dist;
END LOOP;
CLOSE HumRel;
--*****divide hr between the total of dist****
END LOOP;
END LOOP;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|