Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
My aims is to build a job that will do the following:
This what I have done so far.
Job Check Count
Step tMSSqlInput_1 : SELECT COUNT(*) AS CNT FROM TABLE
Step tJava_1 : context.var = row12.CNT; (Assign count value to variable)
Step tJava_2 : System.out.println(context.var); (Print variable var value)
Now I'm looking for an expression that will do a check if tJava_1 value = 0 then proceed to data insertion(Operations)
This is what I have added in the if conditions
((Integer)globalMap.get("tJava_2")).equals(0)
And its not working.
Can someone advice how I may proceed.
in your if connection use:
context.var==0
then in tjava1 "row12.CNT " must be null. Right?
test this by replacing your tjava1 code with something simple like
context.var = 1;