Subject | RE: [firebird-support] Re: Looping a Stored Procedure - Email found in subject |
---|---|
Author | Maya Opperman |
Post date | 2010-05-27T04:53:09Z |
>>I Modified the SP as suggested, but it hangs, I even added suspend forwhile loop, but still hangs
WHILE (REPORTENDDATE <= ENDDATE) DO
BEGIN
FOR SELECT STARTRECEIPT,ENDRECEIPT,RECEIPTCOUNT,TAXABLESALES,
<snip>
DO
BEGIN
SUSPEND;
REPORTSTARTDATE = REPORTSTARTDATE + 1;
REPORTENDDATE = REPORTSTARTDATE + 1;
END
-- if you have no records returned by your FOR SELECT statement, your
WHILE loop will never change... hence the "hanging"
END