Pergunta

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?

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top