unload to balances.ld select num_emp,departamento,nivel_emp,cod_puesto, cod_mov,sum(valor) from notb00008 where clase_mov not in ("I","E") group by 1,2,3,4,5 having sum(valor) > 0 order by 1,5