开发者

Can i join on an inbound oracle cursor in a stored proc?

开发者 https://www.devze.com 2023-03-07 16:35 出处:网络
I have a .NET app that retrieves a SYS_REFCURSOR output from an Oracle 9i stored proc.I would like to take that cursor and pass it into another stored proc to get a different one in return.

I have a .NET app that retrieves a SYS_REFCURSOR output from an Oracle 9i stored proc. I would like to take that cursor and pass it into another stored proc to get a different one in return.

Loose psudocode:

CREATE OR REPLACE PROCEDURE get_Addresses(
     userList IN SYS_REFCURSOR,
     addressList OUT SYS_REFCURSOR)
IS
     OPEN addressList FOR (
        SELECT * FROM Addresses A
        WHERE A.UserID in (SELECT UserID from userList)

This way i can pass a list (dataset) of user info to the stored proc and get a 开发者_开发知识库list of addresses that match the user list passed in.

I'm not much of an oracle developer, but I was hoping there was a way to do this rather than loop through the dataset in .NET and open/close an Oracle connection for each line.

0

精彩评论

暂无评论...
验证码 换一张
取 消