sommererdbeere
Programmer
hi,
this is a little complicated and i will try my best to explain it. i have 6 tables in my sql statement, in which i'm having difficulty to retreive some data from database.
database: oracle 8i
here are the 6 tables:
1. SO_OP soo
2. SO so
3. Shop_Mat_rev smrs
4. MS ms
5. Pur_req pr
6. Rout_Op ros
her is my sql statment:
select
soo.wc soo_wc,
so.so_ordno so_ordno,
soo.op_ordno op_ordno,
pr.pr_ordno pr_ordno,
soo.soo_partno soo_partno,
smrs.smrs_partno smrs_partno,
ms.qtyassem ms_qtyassem
ros.ros_partno ros_partno
from
SO_OP SOO, SO so,
Shop_Mat_rev SMRS, MS ms,
Pur_req pr, Rout_Op ros
where
smrs.smrs_ordno = soo.soo_ordno and
pr.pr_ordno = so.soo_ordno and
smrs.smrs_ordno = so.so_ordno and
ms.partno = so.so_partno and
ros.ros_partno = so.so_partno and
so.state != 'Closed'
Problem:
some orders doesn't happen to be in some of the tables, for example. for ordno = '123'. it has it on
1. SO_OP soo
2. SO so
3. Shop_Mat_rev smrs
6. Rout_Op ros
however, it doesn't have it on
4. MS ms
5. Pur_req pr
where as some of them doesn't have it on Pur_req and SO_OP table or vice versa.
However, all of the orders have it on SO table.
i try to use outer join, but it doesn't work.
Can any of experts please tell me how would i appoarch??
please give me any solution that you will think it is capable in doing it.. This is very urgent, which i haven't sleep for 2 days to figure this out.
million million million trillion thanks for those who help..
thank u
this is a little complicated and i will try my best to explain it. i have 6 tables in my sql statement, in which i'm having difficulty to retreive some data from database.
database: oracle 8i
here are the 6 tables:
1. SO_OP soo
2. SO so
3. Shop_Mat_rev smrs
4. MS ms
5. Pur_req pr
6. Rout_Op ros
her is my sql statment:
select
soo.wc soo_wc,
so.so_ordno so_ordno,
soo.op_ordno op_ordno,
pr.pr_ordno pr_ordno,
soo.soo_partno soo_partno,
smrs.smrs_partno smrs_partno,
ms.qtyassem ms_qtyassem
ros.ros_partno ros_partno
from
SO_OP SOO, SO so,
Shop_Mat_rev SMRS, MS ms,
Pur_req pr, Rout_Op ros
where
smrs.smrs_ordno = soo.soo_ordno and
pr.pr_ordno = so.soo_ordno and
smrs.smrs_ordno = so.so_ordno and
ms.partno = so.so_partno and
ros.ros_partno = so.so_partno and
so.state != 'Closed'
Problem:
some orders doesn't happen to be in some of the tables, for example. for ordno = '123'. it has it on
1. SO_OP soo
2. SO so
3. Shop_Mat_rev smrs
6. Rout_Op ros
however, it doesn't have it on
4. MS ms
5. Pur_req pr
where as some of them doesn't have it on Pur_req and SO_OP table or vice versa.
However, all of the orders have it on SO table.
i try to use outer join, but it doesn't work.
Can any of experts please tell me how would i appoarch??
please give me any solution that you will think it is capable in doing it.. This is very urgent, which i haven't sleep for 2 days to figure this out.
million million million trillion thanks for those who help..
thank u