Re: SQL command for minus 2 columns
From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Tue, 11 May 1999 07:14:32 +0200
Message-ID: <7h8ebk$ed0$1_at_weber.a2000.nl>
Date: Tue, 11 May 1999 07:14:32 +0200
Message-ID: <7h8ebk$ed0$1_at_weber.a2000.nl>
OneZerO
> 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;
or
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