I want to restrict my load with a variable.
where Zahl < 5000 // here I want to use a variable that where is olny active if variable = 1
Thank you for helping
Try like :
where $(variableName) = 1;
you may use it in combination as well like:
where Zahl < 5000 and $(variableName) = 1;
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 => Chanty 4u's solution is more usefull
Thanks it works for you
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
if variable =1 then
Let vCondition ='where Zahl < 5000';
Let vCondition ='';
Please try below.
where If($(vLoadValue)=1, Zahl < 5000) ;
Hi parthesh raval,
doesn't work for $(vLoadValue)=0
Retrieving data ...