Merge two cursors data (select from a cursor?)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christian

    Merge two cursors data (select from a cursor?)

    HI,
    I need to "add" data to a cursor. Since it is not updatable, I would
    like to select from data union all select from my cursor: (test is a
    package)

    (the following fucntion is part of test package body)

    function retcur(Parrec in test%rowtype, Parcur in testpack.MyCUr)
    return testpack.MyCur is
    TestCur testpack.MyCUr;

    begin
    open TestCur for select * from Parcur
    union all select rec.id, rec.fname from dual;
    Return TestCur;
    end;

    My problem is that I cannot select from Parcur cursor. Is there a way
    to achive this? I don't want to create a temp table since there can be
    some locking/access problems.

    Thank you for your help
    Christian
  • KHURRAM

    #2
    Re: Merge two cursors data (select from a cursor?)

    ccote_msl@yahoo .com (Christian) wrote in message news:<992a9b5a. 0404201801.4bb6 b5d1@posting.go ogle.com>...
    HI,
    I need to "add" data to a cursor. Since it is not updatable, I would
    like to select from data union all select from my cursor: (test is a
    package)
    >
    (the following fucntion is part of test package body)
    >
    function retcur(Parrec in test%rowtype, Parcur in testpack.MyCUr)
    return testpack.MyCur is
    TestCur testpack.MyCUr;
    >
    begin
    open TestCur for select * from Parcur
    union all select rec.id, rec.fname from dual;
    Return TestCur;
    end;
    >
    My problem is that I cannot select from Parcur cursor. Is there a way
    to achive this? I don't want to create a temp table since there can be
    some locking/access problems.
    >
    Thank you for your help
    Christian
    Hi Christian,

    Did you try Global Tempoary Table there is no locking issue with this
    excellent feature in oracle 8i and onward and please check if package
    cursor help you.


    Thanks and Regards
    Khurram Naseem

    Comment

    Working...