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 -> Re: Procedure or function returning a result set

Re: Procedure or function returning a result set

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Mon, 24 Mar 2003 20:46:37 +0100
Message-ID: <n2ou7vo42rch3h1gh6gcp7ls065jakbbgj@4ax.com>


On Mon, 24 Mar 2003 17:06:15 +0100, Philippe Makowski <makowski_at_XXXa6cmo.fr> wrote:

>I have a query like this :
>SELECT * FROM ETABLISSEMENT
>WHERE NUM_ETAB IN(
>SELECT NUM_ETAB FROM
>(SELECT
>SUM(DECODE(ID_ANNEE,1998,BB)) AS N ,
>SUM(DECODE(ID_ANNEE,1999,BB)) AS N1 ,
>NUM_ETAB
>FROM DONNEES_TP
>WHERE ID_ANNEE=1998 OR ID_ANNEE=1999
>GROUP BY NUM_ETAB)
>WHERE
>((N IS NOT NULL AND N1 IS NULL)
>OR ((N1-N)/N)<0.5))
>
>But I would like not to hard code 1998,1999 and 0.5 but send them as params
>How can I do ?

By

- next time provide the e-mail address of your teacher right away
- look up CREATE PROCEDURE in your PL/SQL reference manual
- look up REF CURSOR in the same manual.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Mon Mar 24 2003 - 13:46:37 CST

Original text of this message

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