in reply to hoh or hoa data structure

If your only reason is finding the sum of the 4th & 5th column ... then a simple sql query might do it for you.

Here's an example:

select e_id,cus, sum(gd1) as g1, sum(gd2) as g2 from test group by e_i +d,cus,ta;

Replies are listed 'Best First'.
Re^2: hoh or hoa data structure
by Generoso (Prior) on Jan 11, 2011 at 00:41 UTC
    SELECT null, e_id, Cus, ta, gd1, gd2 FROM tabla1 t union all select 'Total', e_id, Cus, ta, sum(gd1), SUM(gd2) from tabla1 group by + e_id,Cus, ta order by e_id,Cus, ta;

      Thanks to all for the different answers. It works perfect.