Re: Procedures question

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Fri, 30 Nov 2001 03:23:00 GMT
Message-ID: <oYCN7.2524$726.1190344_at_news1.sttln1.wa.home.com>


Try creating a type and then specifying the type as the out type. create type .....;
then ...dept_row out mytype...
"James Cummings" <jc1635_at_home.com> wrote in message news:mACN7.133867$pb4.80498227_at_news2.rdc2.tx.home.com...
> This may be simple, but it's beating me about the head.
> As a simple example, what I'd like to do is create a procedure
> that has an OUT variable of some sort that is basically a RECORD.
> Given that my table has a department id, a first and last name, etc.
> Something like:
> ---------------------------------------
> PROCEDURE foo
> ( v_dept_id IN department_table.dept_id%TYPE,
> dept_row OUT department_table%ROWTYPE)
> IS
> BEGIN
> SELECT *
> INTO dept_row
> FROM department_table
> WHERE dept_id = v_dept_id
> ORDER BY lastname;
> END foo;
> -----------------------------------------------
> I've beat around and let it beat on me, and I know this is
> probably simple, but I'm in a mental block right now over it.
> Could someone tell me where I'm missing the point?
>
>
> --------------------------------------------
> James Cummings
> "Chaos, panic, disorder.... my work is done."
>
>
>
Received on Fri Nov 30 2001 - 04:23:00 CET

Original text of this message