sommererdbeere
Programmer
Hi everyone,
I hope all of the experts here can help me to resolve this problem. this is somewhat complicated (at least to me), so that's why i'm asking for help and i really hope any of you can help. this is quit urgent too...
problems: oracle 8
i have 2 tables that i want to join together:
table1: inventory
ordno partno ordtype lineno
22 ii23445 rmj 1
22 ii23426 rmj 2
23 ii23345 rmj 1
c24 ii23446 os 1
e25 ii23443 os 2
25 ii23443 rmj 2
table2: rm
rm_no rm_ordno rm_partno rm_lineno
22 c23 ii23445 1
22 c24 ii23426 1
23 d70 ii23345 1
25 c23 ii23443 2
sql statement:
select
i.orderno,
i.partno,
i.ordtype,
i.lineno,
r.rm_no,
r.rm_ordno,
r.rm_partno,
r.rm_lineno
from inventory i, rm r
where
i.order_no = r.rm_ordno(+) and
i.partno = r.rm_partno(+)and
i.lineno = r.rm_lineno(+)
the "pink" text is where the problems occurred, i think.
if the above sql execute, i have rm_no rm_ordno rm_lineno
to be empty. meaning that nothing got pulled. if i replace r.rm_ordno to r.rm_no in "pink" part, it will only give me the data where i.order_no = r.rm_no.
i was thinking if i can have an "if" statment. like whenever it reads "rmj", i will have i.order_no = r.rma_no, so i can pull out the r.rm_ord_no.
i know it sounds complicated and that's why i'm seeking help from all of you.. please help as i am very stuck.. thank u thank u thank u for alll of your help.
m
I hope all of the experts here can help me to resolve this problem. this is somewhat complicated (at least to me), so that's why i'm asking for help and i really hope any of you can help. this is quit urgent too...
problems: oracle 8
i have 2 tables that i want to join together:
table1: inventory
ordno partno ordtype lineno
22 ii23445 rmj 1
22 ii23426 rmj 2
23 ii23345 rmj 1
c24 ii23446 os 1
e25 ii23443 os 2
25 ii23443 rmj 2
table2: rm
rm_no rm_ordno rm_partno rm_lineno
22 c23 ii23445 1
22 c24 ii23426 1
23 d70 ii23345 1
25 c23 ii23443 2
sql statement:
select
i.orderno,
i.partno,
i.ordtype,
i.lineno,
r.rm_no,
r.rm_ordno,
r.rm_partno,
r.rm_lineno
from inventory i, rm r
where
i.order_no = r.rm_ordno(+) and
i.partno = r.rm_partno(+)and
i.lineno = r.rm_lineno(+)
the "pink" text is where the problems occurred, i think.
if the above sql execute, i have rm_no rm_ordno rm_lineno
to be empty. meaning that nothing got pulled. if i replace r.rm_ordno to r.rm_no in "pink" part, it will only give me the data where i.order_no = r.rm_no.
i was thinking if i can have an "if" statment. like whenever it reads "rmj", i will have i.order_no = r.rma_no, so i can pull out the r.rm_ord_no.
i know it sounds complicated and that's why i'm seeking help from all of you.. please help as i am very stuck.. thank u thank u thank u for alll of your help.
m