Re: Query problem

From: "JAMES" <harleyip(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Query problem
Date: 2000-12-07 14:13:29
Message-ID: 90o5t0$qct4@imsp212.netvigator.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michal Josel 2000-12-07 14:28:35 Problem with encoding
Previous Message JAMES 2000-12-07 13:53:51 Re: Query problem