Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is IF ELSE statement can be used inside sqlplus?
What i want to accomplish is i want to evaluate returned value from the
function.
I know if then else is an pl/sql not sql so i post the question here.just in case anybody has ever done it before.
declare
myout number;
Begin
myout:=func_get_valid_answer;
if myout equal to true(certain number) then
exit from this sqlplus session with exit code 0
if myout equal to false then
exit from this sqlplus session with exit code 1
End;
"Jan Gelbrich" <j_gelbrich_at_westfalen-blatt.de> wrote in message
news:bttmfh$b4i37$1_at_ID-152732.news.uni-berlin.de...
> "Officer" <raboasia_at_pacific.net.sg> schrieb im Newsbeitrag
> news:bttfd7$73t$1_at_nobel2.pacific.net.sg...
> > Is it possible to use IF ELSE statement inside sqlplus?
> >
> > I try to use it couple times, it seems sqlplus does not like it. Any
> > example?
> >
> >
> IF THEN ELSE END IF is PL/SQL, not SQL,
> so If You want to use it, write at least an anonymous PL/SQL-Block
>
> For further details goto http://tahiti.oracle.com
>
>
>
>
Received on Mon Jan 12 2004 - 03:12:02 CST
![]() |
![]() |