hello;
i have more than tow tables in a data base (Access). it have the same structure.
I would like calculate the sum total of a columun ("net" for example) for all tables and put the result in a variable.
Can you please help me
Hi, you could connect different inputs with same structure with tUnite. Than you could use tAggregateRow to calculate the sum. I think something like the following should work too: SELECT sum(net) FROM (SELECT net FROM tab A UNION SELECT net FROM tab b) Bye Volker
hi Volker; i think i can't use tUnit because in reality i used tFlowToIterate to iterate my tables. So what how can you advice me. Thank you for your help.
Hi, OK, it is not as easy as i thought 😉 You could use a temporary file (with append) and than calculate the sum. Or you could use a context variable and calculate the value in a tJavaRow (context.sum+= actualValue) Bye Volker
hello Volker,
Thank you for your anser.Unfortunnatly it doesn't work.
I can't calculate the total sum
after running job i get this message:" The sum is " whitout the result
Can you help me please.
hi Volker; i have yhis message exception when i execute my job:
Exception in component tJava_1 java.lang.NullPointerException at jhgf.cc_0_1.cc.tAccessInput_1Process(cc.java:1045) at jhgf.cc_0_1.cc.runJobInTOS(cc.java:1446) at jhgf.cc_0_1.cc.main(cc.java:1355) please can you help me