Table variable in Oracle stored procedure

后端 未结 2 1520
臣服心动
臣服心动 2021-01-19 04:38

I\'m new to Oracle and I need to translate my SQL Server stored procedure to oracle. In SQL Server, I have function that returns a table variable.

Executing looks l

2条回答
  •  长情又很酷
    2021-01-19 05:16

    I haven't tried this, but since you're not returning the query results directly as output (ie you're executing a command), what if you wrapped it in a PL/SQL block?

    BEGIN
      execute immediate 'insert into tblTSVal(stValue, itemKey, props) ' ||
        'select * from ' || dbMis.fn_ag_valuesToTable(tsVal);
    END;
    /
    

    I'm assuming dbMis.fn_ag_valuesToTable is a function.

提交回复
热议问题