Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle stored procs

Re: Oracle stored procs

From: Rona Crystal <r#as#crystal_at_d#as#ri.mc#as#graw-hill.com>
Date: 1997/07/01
Message-ID: <5pbea9$tdv@mgh_cs1.mgh.com>#1/1

In article <01bc8596$de5a26d0$c47b6496_at_kosh>, dwetzel1_at_rodalepress.com says...
>
>Okay, I'm confused... I want to write a stored proc that does something
>similar to this:
>
>create proc show_dept(dept_id number)
>is
>begin
> select emp, job, sal
> from emp
> where deptno= dept_id;
>end;
>
>In other words, I want to run a report that returns any number of rows
>based on inputted data.
>
>It's beginning to look to me like Oracle can only handle sp's that deal
>with one and only one row. That can't be right, I must be doing something
>wrong.
>

I have a stored procedure that fetches in a loop and fills in several PL/SQL tables that I pass back as parameters. 7.3 allows you to use PL/SQL tables of records which might be just what you need. If your stored procedures get called by ProC you can not use tables of records. That's why I return several PL/SQL tables. An excellent source for this is Steven Feuerstein's book Oracle PL/SQL Programming published by O'Reilly. Also see chapter 4 in Oracle's PL/SQL User's Guide and Reference.

Good Luck,
Rona Crystal

-- 
=====================================================================
Note: My email address has been modified to discourage unsolicited
commercial and offensive email that is sent by bulk mailers.  To
respond personally to this post, remove all strings beginning and
ending with #.  i.e.  j#xx#doe_at_my#yy#comp.com becomes jdoe_at_mycomp.com
---------------------------------------------------------------------
All opinions expressed here are mine alone and do not reflect
the opinion of any other individual or organization.
=====================================================================
Received on Tue Jul 01 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US