Unix Technical Forum

Get BEST date? Get Closest Row?

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 ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 12:06 PM
jobs
 
Posts: n/a
Default Get BEST date? Get Closest Row?

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com