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

Home -> Community -> Usenet -> c.d.o.misc -> Select from stored proc

Select from stored proc

From: <arivlin_at_my-dejanews.com>
Date: Fri, 22 Jan 1999 18:55:16 GMT
Message-ID: <78ahie$aet$1@nnrp1.dejanews.com>


Hi, all,
Here is a beginner's question:
I want to write a stored proc that will do a bunch of preparation ( like set variables for example ) and then run some selects from a table. Here is a SYBASE example:
create proc aaa ( @a int )
as
begin
  select @a = age from DBA where First_Name = 'Bob'

  select First_Name, Last_Name
  from DBA
  where Sex = 'F'
  and Age < @a
  and DB_Type = 'ORACLE'
end

This proc can be run by multiple users that share the same login simulteniously.
How do I do it in ORACLE ? I can not write data to a permanent output table because it will get mixed up with other people who run the same proc, and I do not want to log results. Sometimes results could be huge 500K rows, in which case, I just want to return them to a client app. I do not want them to be stored in a table even temporarily for performance reasons.

How do I do it in Oracle?

Thank you
Alex

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Jan 22 1999 - 12:55:16 CST

Original text of this message

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