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: select inside function

Re: select inside function

From: abdoul85 <abdoul85_at_gmail.com>
Date: Wed, 17 Oct 2007 07:56:28 -0700
Message-ID: <1192632988.636941.206080@y27g2000pre.googlegroups.com>


On 17 Pa , 16:27, Carlos <miotromailcar..._at_netscape.net> wrote:
> On 17 oct, 15:55, abdoul85 <abdou..._at_gmail.com> wrote:
>
>
>
> > create or replace function checkVersion return boolean is
> > a varchar(1000);
> > Res boolean;
> > begin
> > select version into a from v$instance;
> > if (a like '10%') then
> > Res := TRUE;
> > else
> > begin
> > dbms_output.put_line('Skip...');
> > Res := FALSE;
> > end;
> > end if;
> > return(Res);
> > end checkVersion;
>
> > It works fine on oracle 8 database, but on 9 and 10 version:
> > LINE/COL ERROR
> > --------
> > -----------------------------------------------------------------
> > 4/3 PL/SQL: Statement ignored
> > 4/7 PLS-00905: obiekt QGUARADM.CHECKVERSION is incorrect
>
> Grants on v$instance granted through a role?
>
> Cheers.
>
> Carlos.

yes, you're right. I've spent whole day about this :) Received on Wed Oct 17 2007 - 09:56:28 CDT

Original text of this message

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