ORACLE 9i, CR-10
I'm trying to link two tables with a one-to-many relationship, but I only want a one-to-one return on the dataset using the MAX of the time field. This is to assist with performance of the reports.
Our DBAs preference is to do this without creating and views or stored procedures on ORACLE.
Sample tables are below -
TABLE A
========
RECORD,DATE
1,2006/01/01
2,2006/04/05
TABLE B
=======
RECORD,DATE,TIME
1,2006/01/01,07:00
1,2006/01/01,08:00
1,2006/01/01,09:00
2,2006/04/05,07:00
2,2006/04/05,08:00
2,2006/04/05,09:00
2,2006/04/05,10:00
------------------------
DESIRED RESULTS - Only the MAX time for each RECORD and DATE.
===============
RECORD,DATE,TIME
1,2006/01/01,09:00
2,2006/04/05,10:00
------------------------
Thanks in advance for the advice...!
I'm trying to link two tables with a one-to-many relationship, but I only want a one-to-one return on the dataset using the MAX of the time field. This is to assist with performance of the reports.
Our DBAs preference is to do this without creating and views or stored procedures on ORACLE.
Sample tables are below -
TABLE A
========
RECORD,DATE
1,2006/01/01
2,2006/04/05
TABLE B
=======
RECORD,DATE,TIME
1,2006/01/01,07:00
1,2006/01/01,08:00
1,2006/01/01,09:00
2,2006/04/05,07:00
2,2006/04/05,08:00
2,2006/04/05,09:00
2,2006/04/05,10:00
------------------------
DESIRED RESULTS - Only the MAX time for each RECORD and DATE.
===============
RECORD,DATE,TIME
1,2006/01/01,09:00
2,2006/04/05,10:00
------------------------
Thanks in advance for the advice...!