-
Get MAX from column
I'm a novice when it comes to databasing, I'm sure this issue will be easy for you guys, but I wasn't really sure what terms to use for Google search.
Here's what I have:
I have 3 tables that I want to work with.. and the relationship between the columns I am concerned with is as follows:
WTDocument.ida2a2==ObjectHistory.ida3a5
ObjectHistory.ida3b5==LifeCycleHistory.ida2a2
I want to find a way to display a column from LifeCycleHistory, that matches the the column WT.Document.ida2a2. The catch here is... ObjectHistory.ida3a5 has a many to 1 relationship with WTDocument.ida2a2.
So, when I try to do joins, LifeCycleHistory.ida2a2 comes up with several values, depending on how many matches WTDocument.ida2a2==ObjectHistory.ida3a5 results.What I want to do, is obtain one-to-one relationship between WTDocument.ida2a2 and LifeCycleHistory.ida2a2.
What I was thinking was to obtain the maximum value of ObjectHistory.ida3b5 for each ObjectHistory.ida3a5. Then matching that value with LifeCycleHistory.ida2a2. But, I'm not really sure how...
ObjectHistory looks something like this:
ida3a5 ida3b5
1524511 00615
1524511 00715
1524511 00716
1524511 00816
1524511 00819
1524511 00860
Any help would be GREATLY appreciated!
Thanks
Noel
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|