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 -> returning modified resultsets

returning modified resultsets

From: René Laursen <rene_at_ssv.dk>
Date: Mon, 9 May 2005 14:36:09 +0200
Message-ID: <427f58c7$0$67261$157c6196@dreader2.cybercity.dk>


How do I write a stored procedure that is returning only a subset of a resultset.

I know I have to make a package and declare the result type as ref cursor when I want to return a resultset.

But my problem is that I only want to return a subset of the resultset - where the condition for including (or excluding) is not possible to specify in the select statement.

I want to do something like

for
  select field_a,Field_b,Field_c from table   into a,b,c
do
  if somecondition then return (a,b,c) Received on Mon May 09 2005 - 07:36:09 CDT

Original text of this message

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