Hi ,
I am trying to get dates from a second table which is has well test results from adhoc dates, My goal is to get these results to table A (which is the daily production table).
Table A (Sample of Daily Transaction table)
WELLID DATE
201 11-Sep-15
201 12-Sep-15
201 13-Sep-15
201 19-Sep-15
502 10-Oct-15
502 10-Nov-15
Table B (Well Test Table)
WELLID TESTDATE YIELDFACTOR
201 10-Aug-15 500
201 10-Sep-15 300
201 11-Oct-15 200
502 10-Aug-15 50
502 7-Oct-15 170
502 15-Oct-15 200
After joining the data should look like below (with all data from the Daily Transactional table and the corresponding nearest Test dates for that particular well
WELLID DATE TESTDATE YIELDFACTOR
201 11-Sep-15 10-Sep-15 300
201 12-Sep-15 10-Sep-15 300
201 13-Sep-15 10-Sep-15 300
201 19-OCT-15 11-Oct-15 200
502 10-Oct-15 7-Oct-15 170
502 11-Oct-15 15-Oct-15 200
Any help is very much appreciated