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: Is IF ELSE statement can be used inside sqlplus?

Re: Is IF ELSE statement can be used inside sqlplus?

From: Officer <raboasia_at_pacific.net.sg>
Date: Mon, 12 Jan 2004 18:08:05 +0800
Message-ID: <bttrm5$35o$1@nobel.pacific.net.sg>


I only post the logic what i want, not fully working copy of an sqlplus statement.

I need help who has ever done it.

"Onismus Radebe" <onismusrATabsaDOTcoDOTza_at_za> wrote in message news:40027023$0$215_at_hades.is.co.za...
> ----- Original Message -----
> From: "Officer" <raboasia_at_pacific.net.sg>
> Newsgroups: comp.databases.oracle.misc
> Sent: Monday, January 12, 2004 11:12 AM
> Subject: 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;
> >
>
> where's your "END IF"? Looks like its a syntax error...
>
> IF condition1 THEN
> sequence_of_statements1
> ELSIF condition2 THEN
> sequence_of_statements2
> ELSE
> sequence_of_statements3
> END IF;
>
>
>
> -- \|/
> Onismus o o
>

__________________________________oOO_(_)_OOo______________________________

> E-Business and Information Management | Tel: +27 11 350 3414
> Knowledge Discovery & Dissemination | Fax: +27 11 350 8585
> onismusr-AT-absa-DOT-co-DOT-za | Cel: +27 83 591 5310
>


>
>
Received on Mon Jan 12 2004 - 04:08:05 CST

Original text of this message

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