2012-07-04 65 views
1
  1. 我需要加入该子查询,因为它返回多个行。
  2. 接合子查询的样子(我不知道确切的语法):加入从pl/sql函数中选择数据的子查询

    select * from some_pl_sql_function(id_arg) 
    
  3. 我需要id_arg这是一些表的列加入。

  4. 该函数返回arrayofstrings。

最终版本的样子(我猜):

select * from some_table 
left outer join (select * from some_pl_sql_function(id_arg)) sub_query 
    on some_table.id_arg = sub_query.id_arg 

我应该在子查询写这个工作?

+0

可以请您提供示例数据和代码 – psaraj12

回答

1

如果您arrayofstrings(你的函数的返回类型)架构中的级别定义,即 -

create or replace type arrayofstrings as table of varchar2(32767); 

然后你可以使用你的函数是这样的:

select id_arg, column_value from table(some_pl_sql_function(id_arg))