Join of 4 tables
Date: Mon, 22 Jan 2001 12:51:18 GMT
Message-ID: <94hac5$d1s$1_at_nnrp1.deja.com>
Hello,
[Quoted] I have the following SQL query
SELECT S.start_date, B.item_id, B.category, B.vendor, B.subclass,
B.class, B.department,C.location_id, C.region, C.national_code,
A.quantity
FROM (i_item_hierarchy B cross join i_location_hierarchy C
cross join i_bucket_spec S )
left outer join i_demand_forecast_itm_loc A
ON A.start_date = S.start_date
WHERE B.item_id = A.item_id AND C.location_id = A.location_id AND
( rtrim(B.item_id) = 'ITEM002001' AND rtrim(C.location_id) = 'FIE209')
AND S.start_date IN (to_date('01/01/2000'),to_date('02/01/2000'),
to_date('03/01/2000') )
GROUP BY B.item_id,C.location_id,B.category, B.vendor, B.subclass,
B.class, B.department, C.region, C.national_code, S.start_date,
A.quantity;
Here as I mentioned I want a cartesian product of tables B, C and S joined as Left Outer Join with the table A. But the syntax I specified is not supported in Oracle. Can somebody tell me the equivalent statement using Oracle supported syntax.
Thanks in advance for any help.
dinesh
Sent via Deja.com
http://www.deja.com/
Received on Mon Jan 22 2001 - 13:51:18 CET