
August 8th, 2005, 08:49 AM
|
|
Registered User
|
|
Join Date: Aug 2005
Posts: 1
Time spent in forums: 6 m 16 sec
Reputation Power: 0
|
|
SQL JOIN - 3 tables
Hi,
MS access / VB6/data report
I have 3 tables
t1 = products
t2 = purchases (related to t1(1 to many))
t3 = sales (related to t1(1 to many))
t2 & t3 are not related to each other
basically I want to build a profit report using SQL by products
and sums of t2 and t3
I have managed to get a satisfactory view using Right Outer Joins on both sales and purchases, however I am unable to bring them together so I get IE
prods sales purchases
prod1 300.00 250.00
I have tried but the resultant view multiples up sales and/or costs making the figures unacceptable
Any help would be appreciated
|