...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#LOOP i 0 UPTO 10 #RUNQUERY SELECT ${i} AS b, * FROM bid #ENDLOOP |
...
You may also use ${i-1} or ${i+1} (only this two!). For example, this
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#LOOP i 2 UPTO 4
#RUNQUERY
SELECT ${i-1} AS a, ${i+1} AS b, * FROM bid WHERE b>${i}
#ENDLOOP
|
is equal to
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#RUNQUERY
SELECT 1 AS b, * FROM bid3 WHERE b>2
#RUNQUERY
SELECT 2 AS b, * FROM bid4 WHERE b>3
|
#IFDEF
With #IFDEF it is possible to check whether a variable exists and was set by #DEFINE or not. This is useful, for example, to run certain queries corresponding to the current setting.
...