Question

I have the following 2 queries.:

  1. shipManagementInvoiceNetValue:

    SELECT IFNULL (SUM (shipManagementInvoice.netto ), 0) AS shipManagementInvoiceNetValue
    FROM tckopf AS shipManagementInvoice
    WHERE shipManagementInvoice.referenzid = 1
        AND shipManagementInvoice.btyp = 5
    
  2. shipManagementCreditNoteNetValue:

    SELECT IFNULL (SUM (shipManagementCreditNote.netto), 0) AS shipManagementCreditNoteNetValue
    FROM tckopf AS shipManagementCreditNote
    WHERE shipManagementCreditNote.referenzid = 1
        AND shipManagementCreditNote.btyp = 6
    

but I need the result shipManagementInvoiceNetValue - shipManagementCreditNoteNetValue. I'm using a HXTT JDBC DBF driver that supports more than SQL92.

How can I realize that?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top