Re: Query problem

From: JAMES <harleyip_at_hotmail.com>
Date: Thu, 7 Dec 2000 22:13:29 +0800
Message-ID: <90o5t0$qct4_at_imsp212.netvigator.com>


I can't get the expected result.
Actually, I have 5 tables,
I am going to find out current stock quantity of each item for current day, sysdate.
Thanks!
James

invoice

invoice_no     staff_name     trans_date
01                  Lancy Lam     23-DEC-00
02                  Tim Hon         02-DEC-00
03                  Jack Wong     11-DEC-00

trans
invoice_no     item_id     qty
01                 P001         1
01                 P002         5
01                 P033         2
01                 P034         1
02                 P022         4
02                 P034         3
02                 P301         1
03                 P001         1

item
item_id     item_name                         cost     selling_price
P001         Unix Training Package     1000     1200
P002         Unix Guide                       100       200
P022         Let us go Europe               100      400
P033         Europe Travel Route         10        100
P034         Europe travel Video Tape 200      300
P301         Unix Installation CD         500     1000

package
package_id     sub_item_id
P001             P002
P001             P301
P022             P033
P022             P034


stock_in
item_id         trans_date             qty
P001             02-JAN-00         15
P002             01-DEC-00         50
P022             05-MAY-00         70
P033             25-SEP-00         50
P034             01-MAY-00         40
P301             12-DEC-99         30
P001             20-DEC-00         10
P034             21-DEC-00         5
P002             17-DEC-00         10
Received on Thu Dec 07 2000 - 15:13:29 CET

Original text of this message