Hi, I can't check it right now (don't have a compiler right now), but will that query executes ?
select myTable.id_customer, [my_procedure_or_function](myTable.id_customer)
from myTable
group by myTable.id_customer
that procedure/function returns a NUMERIC(18,0) or NULL
to sum up, I need to select distinct id_customer from that table and for that id - get a number/null value currently associated with that id_customer