KenCunningham
Technical User
Hi,
I'm a relative newcomer to Oracle, having had most of my SQL experience using Ingres. I have the following script which would work as required using Ingres, but seems to blow up (ie retrieve far too many records) in Oracle. I reckon it's a function of how the different products handle joins, but would appreciate any advice as to how to fix it. The script is as follows:
spool date_refs
select c06_person_ref,c06_date_contact,c07_person_ref,c07_date_allo
cated,c07_date_unallocated,c09_person_ref,c09_date_input,c57
_person_ref,c57_date_due, c57_date_sent
from t06_referrals, t07_allocations, t09_memos,
t57_report_requests
where c06_person_ref = c07_person_ref
and c07_person_ref = c09_person_ref
and c09_person_ref = c57_person_ref
and c06_date_contact < '01-OCT-96'
and c07_date_allocated < '01-OCT-96'
and c07_date_unallocated < '01-OCT-96'
and c09_date_input < '01-OCT-96'
and c57_date_due < '01-OCT-96'
and c57_date_sent < '01-OCT-96'
/
spool off
/
Many thanks.
I'm a relative newcomer to Oracle, having had most of my SQL experience using Ingres. I have the following script which would work as required using Ingres, but seems to blow up (ie retrieve far too many records) in Oracle. I reckon it's a function of how the different products handle joins, but would appreciate any advice as to how to fix it. The script is as follows:
spool date_refs
select c06_person_ref,c06_date_contact,c07_person_ref,c07_date_allo
cated,c07_date_unallocated,c09_person_ref,c09_date_input,c57
_person_ref,c57_date_due, c57_date_sent
from t06_referrals, t07_allocations, t09_memos,
t57_report_requests
where c06_person_ref = c07_person_ref
and c07_person_ref = c09_person_ref
and c09_person_ref = c57_person_ref
and c06_date_contact < '01-OCT-96'
and c07_date_allocated < '01-OCT-96'
and c07_date_unallocated < '01-OCT-96'
and c09_date_input < '01-OCT-96'
and c57_date_due < '01-OCT-96'
and c57_date_sent < '01-OCT-96'
/
spool off
/
Many thanks.