Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a table with field batch id with many id including 20200523. So i want to do in such a way that if the count of test 2 is 1 because it is equal to test, then it will exit script. But seems like it doesn't work as it will continue on the else portion.
let test = Date(20200523, 'YYYYMMDD');
LET test2 = (Count(if([BATCH_ID]= $(test), 1, 0)));
if test2=1 then
TRACE( Condition is valid);
EXIT Script;
ELSE
continue on the other part of the script
Hi, still having the error.
Syntax error
Unexpected token: '>', expected one of: '(', 'ZTestw_z', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'not', 'bitnot', 'LITERAL_NUMBER', ...
if >>>>>>><<<<<<1 then
The full code now is
let test = Date(today()-1,'YYYYMMDD');
tmp:
load count(BATCH_ID) as Ctmp resident BAD_TPUT where BATCH_ID=$(test);
LET test2 = FieldValue('Ctmp',1);;
drop table tmp;
if $(test2)>1 then
trace --- buzzz ----;
Exit script
else
let test = Date(today()-1,'YYYYMMDD');
tmp:
load count(BATCH_ID) as Ctmp resident BAD_TPUT where BATCH_ID=$(test);
LET test2 = if(isnull(FieldValue('Ctmp',1)),0,FieldValue('Ctmp',1));
drop table tmp;
if $(test2)>1 then
trace --- buzzz ----;
Exit script
else
or share your file