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: PL/SQL

Re: PL/SQL

From: Pieter J.D. Huiberts <phuiberts_at_ivwnet.com>
Date: Wed, 20 Mar 2002 18:16:26 -0500
Message-ID: <3C99184A.9070801@ivwnet.com>


I am not entirely sure I understand your problem, but I suppose you can transfer some of the repeated code ina separate function/procedure and call it over and over again.

Laurent Boutet wrote:

> Hi,
>
> Here is my question :
>
> In my stored proc, I copy 2 times likely the same code. I mean, the code is
> just a bit different for instance :
>
> if param=1 then
> select * from table1;
> else
> select * from table2;
>
> This is a very basic code...but imagine I have hundred lines !!!
> If only I could do such a code :
> select * from table<param>
>
> So I would just have to set the param value...for instance, param=2 then, I
> would have select * from table2;
>
> How can I do such a thing ??????
>
> I hope you understand my problem...
>
> Thanks in advance,
> Laurent
>
>
>
>
>
Received on Wed Mar 20 2002 - 17:16:26 CST

Original text of this message

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