Article View: borland.public.interbase.sql
Article #11352Re: FOR SELECT LOOP
From: Wayne Niddery [TeamB]
Date: Sat, 23 Nov 2002 19:48
Date: Sat, 23 Nov 2002 19:48
32 lines
1921 bytes
1921 bytes
"Arno Brinkman" <bnewsgroups @ abvisie.nl> wrote in message
news:3ddfc059@newsgroups.borland.com...
>
> It seems that you forgot that every "sub-query" should be in the BEGIN -
END
> block.
> FOR SELECT DISTINCT Invoices.date
> FROM Invoices
> WHERE Invoices.month= '200209'
> INTO :DAT
> do
> begin
[...]
> /* Thirth Total */
> select SUM(InvoiceD.total)
> from Invoices Join InvoiceD ON Invoices.invnum =
> InvoiceD.InvoiceD.number
> where Invoices.date = :DAT and InvoiceD.returnc = 3
> GROUP BY Invoices.date
> INTO :TOTAL3;
SUSPEND;
> end
> end
--
Wayne Niddery (Logic Fundamentals, Inc.)
RADBooks: http://www.logicfundamentals.com/RADBooks/delphibooks.html
It used to be that other people's achievements were considered an
inspiration, not a grievance.
Technical Details
Message-ID:
<3ddfdc10@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-01!sn-xit-04!supernews.com!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3ddfb5ea$1@newsgroups.borland.com> <3ddfc059@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114a0e,93dd659978b88a04 X-Google-Attributes: gid114a0e,public X-Google-ArrivalTime: 2002-11-23 12:08:50 PST From: "Wayne Niddery [TeamB]" <wniddery@chaff.aci.on.ca> Newsgroups: borland.public.interbase.sql References: <3ddfb5ea$1@newsgroups.borland.com> <3ddfc059@newsgroups.borland.com> Subject: Re: FOR SELECT LOOP Date: Sat, 23 Nov 2002 14:48:36 -0500 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 209.50.82.158 Message-ID: <3ddfdc10@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038081040 209.50.82.158 (23 Nov 2002 11:50:40 -0800) X-Authenticated-User: wniddery Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-01!sn-xit-04!supernews.com!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail