Maybe it's just Friday but can I have a couple of SELECTs joined with UNION
and then GROUP BY on the final output?
* in this example, I'm wanting a single record, ref='A', qty=15
CREATE CURSOR a1 (ref C(1), qty N(2,0))
CREATE CURSOR b1 (ref C(1), qty N(2,0))
INSERT INTO a1 (ref, qty) ;
VALUES ('A', 10)
INSERT INTO b1 (ref, qty) ;
VALUES ('A', 5)
SELECT ref, qty ;
FROM a1 ;
UNION ;
SELECT ref, qty ;
FROM b1 ;
GROUP BY 1
--
TIA
Andrew Howell