Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-lond.gip.net!news-raspail.gip.net!news.gsl.net!gip.net!grolier!v.t-online.fr!t-online.fr!news.glorb.com!postnews.google.com!n13g2000cwa.googlegroups.com!not-for-mail
From: happyardy@gmail.com
Newsgroups: comp.databases.oracle.misc
Subject: Re: what is the SQL equivalent of 'continue' and 'break' in C ?
Date: 8 Aug 2006 07:15:38 -0700
Organization: http://groups.google.com
Lines: 50
Message-ID: <1155046538.360453.30450@n13g2000cwa.googlegroups.com>
References: <1155045030.708842.232460@i3g2000cwc.googlegroups.com>
   <1155045968.087834.19670@b28g2000cwb.googlegroups.com>
NNTP-Posting-Host: 134.153.234.91
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1155046543 7539 127.0.0.1 (8 Aug 2006 14:15:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 8 Aug 2006 14:15:43 +0000 (UTC)
In-Reply-To: <1155045968.087834.19670@b28g2000cwb.googlegroups.com>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: n13g2000cwa.googlegroups.com; posting-host=134.153.234.91;
   posting-account=csOOww0AAABRnfj8LynXGF0hR3mfOsV1
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:129133


Scott wrote:
> happyardy@gmail.com wrote:
> > what is the SQL equivalent of 'continue' and 'break' in C ?
> >
> > like can I do this...
> >
> >
> > for counter in 1..10
> >   if(something something)
> >    ( if (something)
> >      ( if(something)
> >  then continue;
> >
> >    //Rest of the for loop
> >
> >  end loop;
> >
> > Would it start the next iteration without processing the rest of the
> > loop ?
> >
> > thanks
> >  - Ardy
>
> If I understand the question, something like this in PL/SQL
>
> loop
>
>   loop
>      if something
>      then
>         exit; -- continue, i.e. go on with the rest of the main loop
>      end if;
>
>   end loop;
>
>   if something_else
>   then
>     exit; -- break, i.e. get out of the main loop
>   end if;
>   -- rest of the for loop
>
> end loop;


Scott,
Thanks for that. I'll try it after lunch and see if it works. Will let
you know.
 - Ardy

