This is a discussion on Get BEST date? Get Closest Row? within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Please excuse my last post. That was insane and i don't expect anybody to think about that crazy excuse ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Please excuse my last post. That was insane and i don't expect anybody to think about that crazy excuse of a problem. But if someone does have anything to offer for it that would be hugely appreciated it. That said, and to boil down what I need. I have two tables Activity (many rows per ssn but no overlaping of dates)) ssn status effective date Participation (many rows per snn but no overlaping of dates): ssn plan effective termination I need to write a function that returns the Earliest (BEST) termination date given some values in. ssn, effective date, period start date return the EARLIEST termination date.: termination dates for those three inputs is based on: * the next Activity effective * the period Selection EndDate * The next Participation Termination. |