Re: Procedures question

From: Forrest Cicogni <fcicogni_at_sageasset.com>
Date: Fri, 30 Nov 2001 14:34:33 -0500
Message-ID: <1007134697.663410_at_news>


You are trying to put more than one row into the record. You need to create a pl/sql variable of type * table of department_table%ROWTYPE*

"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 - 20:34:33 CET

Original text of this message