Re: SQL command for minus 2 columns

From: Arjan van Bentem <>
Date: Tue, 11 May 1999 07:14:32 +0200
Message-ID: <7h8ebk$ed0$>


> i need to minus ship_qty from order_qty which both are
> link by a product_no.

Simply add the maths in your SELECT and, optionally, add an alias like open_qty to use as a reference in your Reports:

    select ship_qty
    , order_qty
    , (order_qty - ship_qty) open_qty
    from my_table;


    select a.ship_qty
    , b.order_qty
    , (b.order_qty - a.ship_qty) open_qty     from my_table1 a
    , my_table2 b
    where a.product_no = b.product_no;

Arjan. Received on Tue May 11 1999 - 07:14:32 CEST

Original text of this message