Create a (temp) table? Regards, Alastair.
On 16/02/2017 16:26, Bruce Chitiea wrote: Thanks, Karen. That's pretty much what I've been doing. I've been stepping through incrementing values within nested loops, or using a loop inside a cursor. Just wondering how one might replace that "inside" loop with a cursor. Thinking of a syntax along the lines of: DECLARE CursorName CURSOR (1,2,3,4,5) or: DECLARE CursorName CURSOR ARRAY(arg1,arg2,arg3) where at their simplest: arg1 = starting value arg2 = ending value arg3 = increment Thinking major speed improvement and code simplification with a cursor. Bruce ------ Original Message ------ Sent: 2/16/2017 8:17:46 AM Subject: Re: [RBASE-L] - DECLARE CURSOR Source Data Array From: "karentellef via RBASE-L" <rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com>> To: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> Cc: Can you do a while loop with a ssub? SET VAR vLoop INT = 1 SET VAR vList = (1,2,3,4,5) WHILE 1 = 1 THEN SET VAR vText = (SSUB(.vList,.vLoop)) IF vText IS NULL BREAK ENDIF -- Do something SET VAR vLoop = (.vLoop + 1) ENDWHILE Karen -----Original Message----- From: Bruce Chitiea <rby...@safesectors.com<mailto:rby...@safesectors.com>> To: rbase-l <rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com>> Sent: Thu, Feb 16, 2017 10:09 am Subject: [RBASE-L] - DECLARE CURSOR Source Data Array All: Is there an "elegant" way to do this with a simple array of values: DECLARE CursorName CURSOR FOR (1,2,3,4,5) ... where we're stepping through the array WITHOUT drawing upon a source table? A long shot: SELECT 1,2,3,4,5 FROM TableName LIMIT 1 ... (where TableName is any table chosen arbitrarily to provide syntax) produces: 1 2 3 4 5 ... instead of the needed: 1 2 3 4 5 Thoughts? Bruce Chitiea SafeSectors, Inc. 909.238.9012 Mobile -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.