Re: QUERY PROBLEM?

From: TurkBear <johng_at_mm.com>
Date: Mon, 08 Jun 1998 16:04:19 GMT
Message-ID: <357d0ae4.8116651_at_news2.mm.com>


"Developer" <MSIS_at_cyberdude.com> wrote:

>
>J. Yen wrote in message <357BCCFE.2F331A3D_at_comp.hkbu.edu.hk>...
>>I used the below SQL statement, but only last record selected.
>>DECLARE
>> CURSOR C IS
>> SELECT A.SEQNO
>> ,A.NAME
>> FROM NAME A
>> WHERE A.DEPT = 'ACCT';
>>
>> BEGIN
>> OPEN C;
>> LOOP
>> FETCH C INTO
>> :SEQNO, :NAME;
>> EXIT WHEN C%NOTFOUND;
>> END LOOP;
>> CLOSE C;
>>
>> END;
>>
>> Does anyone know the problem in this SQL statement? Thank you!
>>
>
>What are :SEQNO, :NAME . If these are the names of you Dev2K form items then
>you have to use :block.field notation.
>
>
Also, you only have 1 set of variable containers, so each returned value replaces the previous value...hence, only the last value retrieved is 'current' - If :SEQNO and :NAME are part of a multi-record block, then it should work..... Received on Mon Jun 08 1998 - 18:04:19 CEST

Original text of this message