I have two simple queries
select sum(deb)-sum(cre) as result1 from CXC where id='22731999'
select sum(deb)-sum(cre) as result2 from CXC where id='22731999' and tipo='IM'
the difference is the where, for example the first query results in 769686 and the second in 3469, what I have to do, to see the result of the two queries in one result?
result1 result2
----------------
769686 3469
I tried
select sum(C.deb)-sum(C.cre) as Result1 from CXC C where C.id='22731999'
UNION
select sum(X.deb)-sum(X.cre) as Result2 from CXC X where X.id='22731999' and .tipo='IM'
but this is not what I want because it results in 2 rows
result1
result2
I must say that I used this query under an ODBC bridge to connect Cobol files, the driver is tooo old.. so the sql is quite basic.. I have this limitation :(
the name of the driver is Relational DataBridge for RM Cobol