Re: Oracle Noob need help with function

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 28 Jul 2004 06:30:06 -0700
Message-ID: <2687bb95.0407280530.4860c888_at_posting.google.com>


jerel_at_rockbaby.com (spawncamper) wrote in message news:<f2f4fe50.0407271157.189f42ff_at_posting.google.com>...
> Hi -
>
> I posted here a few weeks back and people were kind enough to help.
> In lieu of my PL/SQL class I take in a few weeks, I was hoping to get
> some more advice.
>
> Here's my scenario: I need a function to return a table of data for
> Oracle8i.
> I'm fairly certain of the stucture for the function, but am hazy on
> the details.
>
> CREATE OR REPLACE FUNCTION test_function (id in varchar2)
>
> return table ****i know this isn't correct
>
> IS
>
> TYPE ref0 IS REF CURSOR;
> cur0 ref0;
>
> BEGIN
>
> OPEN cur0 FOR
> select id, name from user where id = id;
>
> *****PERFORM SOME SORT OF LOOP AND ASSIGN TO VARIABLES - AM HAZY
> HERE****
>
> return table;
> end;
>
> Any assistance is greatly appreciated. Thank you for your time.

Look in the PL/SQL manual. It is available free online via several sites including technet.oracle.com (PDF downloads) and tahiti.oracle.com which provides online search capability.

HTH -- Mark D Powell -- Received on Wed Jul 28 2004 - 15:30:06 CEST

Original text of this message