Hi
I have a query I would like to build where I want to find related information in a distantly related table.
For example each Library has many Synthesis_Plates, which in turn have many Synthesis_Compounds, which in turn have many Analytical Submissions. My question is how to find the Library for a given Analytical Submission.
I know I can do it just by joining them all up on the primary keys and specifying a select distinct, but this seems inelegant and wasteful. Is there a way to specify that for a join, Oracle should stop looking when it finds the first match.
I also know I could do this using rownum with maybe a first rows hint, but again it seems to me such a common thing that there might be an easier way.
Thanks if you can help, or even if you can’t (for reading this!)
Mark
I have a query I would like to build where I want to find related information in a distantly related table.
For example each Library has many Synthesis_Plates, which in turn have many Synthesis_Compounds, which in turn have many Analytical Submissions. My question is how to find the Library for a given Analytical Submission.
I know I can do it just by joining them all up on the primary keys and specifying a select distinct, but this seems inelegant and wasteful. Is there a way to specify that for a join, Oracle should stop looking when it finds the first match.
I also know I could do this using rownum with maybe a first rows hint, but again it seems to me such a common thing that there might be an easier way.
Thanks if you can help, or even if you can’t (for reading this!)
Mark