Sample Header Ad - 728x90

Subtract values from SELECT in SQL

0 votes
1 answer
8250 views
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?
Asked by BuZZ-dEE (131 rep)
Feb 11, 2014, 06:42 PM
Last activity: Feb 12, 2014, 07:59 AM