我想创建一个匿名块,在其中执行以下操作:
set session set current_schema = PTSI;
DECLARE
var_cur_proj structure.structure_code%TYPE;
var_cur_task structure.structure_code%TYPE;
TYPE tbl_result AS OBJECT
(
projeto_id structure.structure_code%TYPE,
projeto structure.description%TYPE,
tarefa_id structure.structure_code%TYPE,
tarefa structure.description%TYPE,
recurso_id structure.structure_code%TYPE,
recurso structure.description%TYPE,
perfil_id structure.structure_code%TYPE,
perfil structure.description%TYPE,
rate_id structure.structure_code%TYPE,
rate_value rate_change_point_res.rate_value%TYPE,
dia date,
horas_reportadas NUMBER(38,2),
horas_integradas_realizadas NUMBER(38,2),
horas_integradas_remanescentes NUMBER(38,2),
horas_planeadas NUMBER(38,2)
);
TYPE table_resul IS TABLE OF tbl_resul;
resultado table_result;
BEGIN
END;
/
这给了我一个错误...我正在关注此站点以创建表变量(http://ss64.com/oraplsql/declaretbl.html),发现它不起作用,我尝试创建表变量,例如我习惯于创建函数返回的表(创建对象然后创建表)。
任何人都可以帮助我吗?