Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to restrict my load with a variable.
Example:
Test:
Load
*
resident Pretest
where Zahl < 5000 // here I want to use a variable that where is olny active if variable = 1
Thank you for helping
Robert
try this
1. don't set the variable in the script to an empy value (let Myvar = '';)
2. use right notation in Where Clause:
WHERE (Field1 = $(Myvar)); // on numeric value
WHERE (Field1 = '$(Myvar)'); // on string value
or simply
WHERE '$(vtest)'=1;
Try like :
where $(variableName) = 1;
you may use it in combination as well like:
where Zahl < 5000 and $(variableName) = 1;
try this
1. don't set the variable in the script to an empy value (let Myvar = '';)
2. use right notation in Where Clause:
WHERE (Field1 = $(Myvar)); // on numeric value
WHERE (Field1 = '$(Myvar)'); // on string value
or simply
WHERE '$(vtest)'=1;
if variable =1 then
Let vCondition ='where Zahl < 5000';
else
Let vCondition ='';
Endif
Test:
Load
*
resident Pretest
$(vCondition);
Thank you.
It works if $(variableName) = 1
but if $(variableName) = 0 there is no load => I want to load everything if $(variableName) = 0
In that case, I guess the example kush141087 explained below should work. Try that.
Thank you very much => sureshqv
Thanks it works for you
Hello,
Please try below.
Example:
Test:
Load
*
resident Pretest
where If($(vLoadValue)=1, Zahl < 5000) ;
Hi parthesh raval,
doesn't work for $(vLoadValue)=0