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

Re: PL/SQL

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Wed, 20 Mar 2002 17:30:46 +0100
Message-ID: <3C98B936.1DF84778@mytoys.de>


> 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 ??????

With dynamic SQL, you can tinker the needed statements very easy.

Regards,

Knut Received on Wed Mar 20 2002 - 10:30:46 CST

Original text of this message

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