YANGYANYANYANYAN 2013-12-01 04:17 采纳率: 0%
浏览 1213

oracle 自定义函数返回一个自定义整数列,如何在下一个自定义函数中,调用上一个函数

---自定义类型
create or replace type t_int is table of integer

-- Create table
create table TESTFUNCTION
(
oid INTEGER,
result INTEGER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255;

-- Create table no.1
create or replace function FindAllChildGroup1 (mid int)
Return T_INT--dtable table(ID int)
As
dtable T_INT;
Begin
select T_INT(a.result) into dtable from testfunction a where a.oid!=mid ;

return (dtable);
END FindAllChildGroup1;

-- Create table no.2
create or replace function FindAllChildDoc (pid IN OUT int)
Return T_INT--- dtable table(ID int)
As
dtable T_INT;
dtable_ T_INT;
Begin
dtable_:= FindAllChildProject (pid);
select T_INT(a.o_itemno) into dtable from
(
select o_itemno from CDMS_Doc
where o_projectno in (select * from dtable_)

         ) a ;

return (dtable);
End FindAllChildDoc;

现在的问题在 ‘ where o_projectno in (select * from dtable_)’这句

错误:PL/SQL: ORA-00942: 表或视图不存在
行:11
文本:where o_projectno in (select * from dtable_)

错误:PL/SQL: SQL Statement ignored
行:8
文本:select T_INT(a.o_itemno) into dtable from

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 一道python难题2
    • ¥15 一道python难题
    • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试
    • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
    • ¥15 教务系统账号被盗号如何追溯设备