New answers tagged jdbc
This does also work.: SELECT SUM ( CASE WHEN btyp = 6 THEN netto ELSE 0 END) - SUM(CASE WHEN btyp = 5 THEN netto ELSE 0 END) FROM tckopf WHERE referenzid = 1;
try ISNULL(SUM (shipManagementInvoice.netto ), 0)
There are several ways to rewrite the query and even more because both subqueries use the same base table. Not sure why the error is thrown and who is to blame, the JDBC drivers, the Foxpro or something else, so here are a few alternatives: (1) using one query for both searches: SELECT COALESCE(SUM(CASE WHEN t.btyp = 5 THEN t.netto ...
Top 50 recent answers are included