Discussion Board for collaboration on QlikView Scripting.
Could you please help me with this peace of script:
For i = 1 To $(LOOP_COUNTER)
if i = 1 Then SET SelectORJoin = 'Sql Select';
else SET SelectORJoin = 'Join (Table1) Select';
How could we write this in qlikview script?
Thanks a lot,
Go to Solution.
The problem was the THEN, without it , it works fine:
if i = 1 SET SelectORJoin = 'Sql Select';
Thanks a lot!
Either with an inline join:
let SelectORJoin = if(i=1, 'SQL SELECT', 'JOIN (Table1) SELECT');
Or with an if structure like VBA:
if i = 1 then
let SelectORJoin = 'SQL SELECT';
let SelectORJoin = 'JOIN (Table1) SELECT';
Note that semi colons are not required on the end of the construct lines, the one at the end of your next statement is also superfluous.
Hope that helps,