🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11151

Re: Getting out of a For Select

#11151
From: G. Allen Casteran
Date: Tue, 03 Dec 2002 23:28
22 lines
1645 bytes
Either Change your SQL to ONLY return 1 row, or in your loop set a flag 
when you are done and check the flag value at the loop start to see if 
you need to do the processing portion. You will still be scanning over 
the records in the result set, though.

Allen.

In article <3de379e0@newsgroups.borland.com>, jcmarcussojr@hotmail.com 
says...
> Hi all,
> 
>   I have a select in a  stored procedure that can return multiple records
> but I only need to get the first one. How can I do it ?
>   I haven't found a way to get out of a "for select" and continue executing
> mystored procedure. I cannot use a group y clause nor functions like min,
> max.
>   I am using Interbase 6.0.2 with Win2k.
> 
>   Thanks for reading.
> 
> Juliano
Technical Details
Message-ID: <MPG.1856ddf779b6e06f989685@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3de379e0@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,347cf761cb64a319
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-03 15:39:32 PST
From: G. Allen Casteran <allen@nisinc.com>
Newsgroups: borland.public.interbase.sql
Subject: Re: Getting out of a For Select
Date: Tue, 3 Dec 2002 15:28:27 -0800
Message-ID: <MPG.1856ddf779b6e06f989685@forums.borland.com>
References: <3de379e0@newsgroups.borland.com>
Distribution: Global
Organization: Network Information Services, Inc.
X-Newsreader: MicroPlanet Gravity v2.60
NNTP-Posting-Host: 208.37.62.90
X-Trace: newsgroups.borland.com 1038957793 208.37.62.90 (3 Dec 2002 15:23:13 -0800)
Lines: 23
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail