How to return a record set from a PL/SQL procedure/function?

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

    How to return a record set from a PL/SQL procedure/function?

    Hi,

    does anyone know if, and how, I can return a record (set) from a stored
    procedure/function?

    What does the function have to do?
    well at this moment I'm porting our product's database based global registry
    from SQL Server to Oracle10g (as it has to work on both). Now I have a
    function called CreateKey, which like the name says creates a single key
    entry in the global registry. Afterwards it has to return with the created
    key (a single row) and it's newly generated globally unique identifier, but
    if the key already existed it should return with the existing key
    information.

    Could someone please help me?

    ps. I'm using Oracle10g.

    Thanx,
    Alexander


  • Jim Kennedy

    #2
    Re: How to return a record set from a PL/SQL procedure/function?


    "Alexander Pino" <Alexander.Pino @cea-int.comwrote in message
    news:40bdc779$0 $49150$e4fe514c @news.xs4all.nl ...
    Hi,
    >
    does anyone know if, and how, I can return a record (set) from a stored
    procedure/function?
    >
    What does the function have to do?
    well at this moment I'm porting our product's database based global
    registry
    from SQL Server to Oracle10g (as it has to work on both). Now I have a
    function called CreateKey, which like the name says creates a single key
    entry in the global registry. Afterwards it has to return with the created
    key (a single row) and it's newly generated globally unique identifier,
    but
    if the key already existed it should return with the existing key
    information.
    >
    Could someone please help me?
    >
    ps. I'm using Oracle10g.
    >
    Thanx,
    Alexander
    >
    >
    Look up ref cursor in the docs as an out parameter.
    Jim


    Comment

    • Alexander Pino

      #3
      Re: How to return a record set from a PL/SQL procedure/function?

      Probably I should have mentioned that I want to use it in combination with
      ..NET and C# in particularly.

      Alexander

      "Alexander Pino" <Alexander.Pino @cea-int.comwrote in message
      news:40bdc779$0 $49150$e4fe514c @news.xs4all.nl ...
      Hi,
      >
      does anyone know if, and how, I can return a record (set) from a stored
      procedure/function?
      >
      What does the function have to do?
      well at this moment I'm porting our product's database based global
      registry
      from SQL Server to Oracle10g (as it has to work on both). Now I have a
      function called CreateKey, which like the name says creates a single key
      entry in the global registry. Afterwards it has to return with the created
      key (a single row) and it's newly generated globally unique identifier,
      but
      if the key already existed it should return with the existing key
      information.
      >
      Could someone please help me?
      >
      ps. I'm using Oracle10g.
      >
      Thanx,
      Alexander
      >
      >

      Comment

      Working...