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: select (case when .... then ... else ... end) not working in packages?

Re: select (case when .... then ... else ... end) not working in packages?

From: <kenneth.koenraadt_at_no-spam.hotmail.com>
Date: Sun, 20 Oct 2002 10:01:10 GMT
Message-ID: <3db27ccf.760813@news.mobilixnet.dk>


On Sun, 20 Oct 2002 00:11:29 -0700, "M Hashim" <m.a.n.hashim_at_sympatico.ca> wrote:

>> It's a bug. The workaround is to rewrite the query in dynamic SQL.

>True..Did the workaround, and it works fine.
>Your choice,
> Execute immediate
>or
> DBMS_SQL
I would also consider a dynamic cursor thing like this :

create or replace procedure foo
  is

    Type            cursorT is REF CURSOR;
    lCur            cursorT;
   lStatement      varchar2(1000);

begin
 lstatement := 'select case when 1 then 1 else 0 end'; open lCur for lStatement;
/* fetch the row(s) here */
end foo;
/ Received on Sun Oct 20 2002 - 05:01:10 CDT

Original text of this message

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