CREATE OR REPLACE PROCEDURE docmapfile_temp_tempid
AS
CURSOR c1
IS
SELECT docid, fileid
FROM docmapfile_temp;
BEGIN
FOR c1rec IN c1
LOOP
UPDATE docmapfile_temp
SET tempid = c1rec.docid + c1rec.fileid
WHERE docid = c1rec.docid AND fileid = c1rec.fileid;
COMMIT;
END LOOP;
END;
/
ORA-06550: 第 2 行, 第 12 列:
PLS-00302: 必须说明 'DOCMAPFILE_TEMP_TEMPID ' 组件
ORA-06550: 第 2 行, 第 3 列:
PL/SQL: Statement ignored
------解决方法--------------------------------------------------------
漏了个is?
------解决方法--------------------------------------------------------
COMMIT;
END LOOP;
-->
END LOOP;
COMMIT;
------解决方法--------------------------------------------------------
END LOOP;
END;
-->
END LOOP;
END docmapfile_temp_tempid;
------解决方法--------------------------------------------------------
--编译没有错误啊
CREATE OR REPLACE PROCEDURE docmapfile_temp_tempid
AS
CURSOR c1
IS
--SELECT docid, fileid
-- FROM docmapfile_temp;
select * from b_areas;
BEGIN
FOR c1rec IN c1
LOOP
--UPDATE docmapfile_temp
-- SET tempid = c1rec.docid + c1rec.fileid
--WHERE docid = c1rec.docid AND fileid = c1rec.fileid;
dbms_output.put_line (c1rec.area_id);
COMMIT;