Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Roland Mueller — — source: Informix-list mailing list archive (1991-1998)
john@a3bgate.nai.net wrote:
>
> Spetc@aol.com wrote:
> : }FOREACH cursor INTO something.*
> : } LET counter = counter + 1
> : } IF counter >= 100 THEN
> : } EXIT FOREACH
> : } END IF
> : }END FOREACH
>
> : Wouldn't this still take "ages", because of the fact that FOREACH would still
> : open a cursor and select all the data (say 10,000 rows) ?
>
> How about
>
> OPEN cursor ...
> FOR i = 1 TO 100
> FETCH ...
> END FOR
> CLOSE cursor
>
> John
This does the same as the example shown above.
Roland
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.