I have rock type data for a drillhole in the form of from and to depth interval down the drillhole. I also have sample chemistry data that has different from-to intervals down the hole to the rock types. I want to assign the rock type (majority code) to each of the chemistry samples. Note that intervals may be overlapping and variable in length. eg
Rock Types
15-20 Conglom
20-22 Sandstone
22-25 Shale
25-32 Coal
Chemistry Sample intervals
A 16-20
B 20-25
C 25-30
I am wanting a query / code to be able to assign rock types to samples A, B and C as follows
- A Conglom
- B Shale
- C Coal
I am sure I am not the first person to be stumped with this question - Please point me to another thread if applicable. I have posted under queries, but also point me if this is more applicable to another forum area. Many thanks for any interest in my query, Please let me know what this is called in database speak so I may be able to search other areas also. Kind regards