Adam Posted May 17, 2010 Share Posted May 17, 2010 Hey up. I'm quite stuck on this after playing around with it for about five hours. Basically I'm working on a pretty extensive Oracle framework, trying to use 1 procedure to populate a cursor in my procedure. So I build up a list of IDs within a cursor: cursor cPages is -- get a list of matching pages select pages.page_id from (....) That part's no problem. But later I want to loop through the cursor, calling a procedure to populate another cursor. So far I've been trying: -- get the page information for each page for vPage in cPages loop getPage(vPage.page_id, pSitecode, pLang, pAuthLevel, cResults, cLocale); end loop; Currently this does work but only returns the last page - obviously must be overwriting the cursor each time. Could somebody please point out what I'm doing wrong? Thanks a lot for any help you can give! Adam Link to comment https://forums.phpfreaks.com/topic/202019-assign-the-return-cursor-of-a-procedure-to-another-cursor-plsql/ Share on other sites More sharing options...
Adam Posted May 17, 2010 Author Share Posted May 17, 2010 Sorry to be more clear, "cResults" in the procedure call is the cursor I'm trying to populate with the page information. Link to comment https://forums.phpfreaks.com/topic/202019-assign-the-return-cursor-of-a-procedure-to-another-cursor-plsql/#findComment-1059382 Share on other sites More sharing options...
Adam Posted May 17, 2010 Author Share Posted May 17, 2010 From what I've read it's impossible to append or merge anything into a cursor in that way. Normally I'd use a join for something like this, but obviously as it's calling another procedure I can't, and the code within that procedure is about 100 lines long so I can't really just duplicate it. Can anybody suggest a work-around that would allow me to achieve the same thing? Thanks Link to comment https://forums.phpfreaks.com/topic/202019-assign-the-return-cursor-of-a-procedure-to-another-cursor-plsql/#findComment-1059521 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.