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

Re: Variable selects in PL/SQL

From: Karl E. Jørgensen <kjorg_at_msn.com>
Date: 1997/09/20
Message-ID: <01bcc5d2$fcf2b5e0$cb4f95c1@karljorg>#1/1

Sounds like you should try using the DBMS_SQL package. This is also accessible from within SQL*Forms

Karl

Dennis de Visser <dennisv_at_bart.nl> wrote in article <5v1l7d$hfs_at_nosy.bart.nl>...
> Dear ORACLE users,
>
> Can some one help me to create a variable select statement in PL/SQL.
>
> I'm looking for a way to get the same result as the example ( SQL*Plus ),
 so
> it can be used in Forms.
>
>
>
>
> COLUMN where1 NEW_VALUE where1 NOPRINT
>
> SELECT DECODE('&1','%' ,NULL
>
> ,'EAST','AND dept IN (''10'',''20'')'
>
> ,'WEST','AND dept IN (''30'',''40'')'
>
> ,NULL) where1
>
> FROM DUAL
>
> ;
>
>
>
> SELECT ename
>
> FROM emp
>
> WHERE mng IS NOT NULL &where1
>
> ORDER BY ename
>
> ;
>
> I hope some of you got the answer.
>
> Kind regards,
>
> Dennis de Visser,
> ORACLE programmer
> Syntegra Netherlands
> dennisv_at_bart.nl
>
>
>
>
>
>
>
>
>
>
Received on Sat Sep 20 1997 - 00:00:00 CDT

Original text of this message

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