我已经将我的表的几何图形转换为一个只有两个字段(Geometry 和 SDO_RowID)的新表
我需要获取原始表中的所有数据并将其带到新表中。我在新表中创建了列,现在我正在尝试使用 For Update Of 游标来获取数据。
我只是不确定如何以正确的方式遍历所有数据/使其工作。谢谢。
DECLARE
CURSOR OTTAWACOLLECTS IS
SELECT SHAPE_LENG,
CLASS,
SUBCLASSIF,
ROAD_NAME,
ROAD_TYPE,
ROAD_DIREC,
MUNICIPALI,ADDRESS_LE,
ADDRESS__1,
ADDESSS_RI,
ADDRESS_RI, ROAD_NAME_
FROM OTTAWACOLLECTORS
WHERE OTTAWACOLLECTORS_NAD.SDO_ROWID = ROWID
FOR UPDATE OF OTTAWACOLLECTORS_NAD;
BEGIN
FOR ROWID IN OTTAWACOLLECTS
LOOP
UPDATE OTTAWACOLLECTORS_NAD
SET SHAPE_LENG = OTTAWACOLLECTORS.SHAPE_LENG,
CLASS = OTTAWACOLLECTORS.CLASS,
SUBCLASSIF = OTTAWACOLLECTORS.SUBCLASSIF,
ROAD_NAME = OTTAWACOLLECTORS.ROAD_NAME,
ROAD_TYPE = OTTAWACOLLECTORS.ROAD_TYPE,
ROAD_DIREC = OTTAWACOLLECTORS.ROAD_DIREC,
MUNICIPALI = OTTAWACOLLECTORS.MUNICIPALI,
ADDRESS_LE = OTTAWACOLLECTORS.ADDRESS_LE,
ADDRESS__1 = OTTAWACOLLECTORS.ADDRESS__1,
ADDRESSS_RI = OTTAWACOLLECTORS.ADDESSS_RI,
ADDRESS_RI = OTTAWACOLLECTORS.ADDRESS_RI,
ROAD_NAME = OTTAWACOLLECTORS.ROAD_NAME_
WHERE CURRENT OF OTTAWACOLLECTS;
END LOOP;
END;