|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Complex date logic - Help needed
This concerns eligibility healthcare information. A member can have multiple rows in the table showing they are eligible for different date ranges with different health plans. eff_date and term_date are the fields in this table. Term_date can be NULL.
I need a WHERE statement that shows members 1) eligible between 1/1/2004 and 8/15/2004 (term_date is null or term_date >= '8/15/2004') and eff_date <='1/1/2004' 2) members are allowed only one gap in this timeframe of up to 45 days. *NEED HELP 3) a gap of 1 day should not be counted as a gap in enrollment. *NEED HELP Any help on #2 and #3 would be appreciated. |
|
#2
|
|||
|
|||
|
as far as the 45 day gap, that sounds like something the data entry verification code should take care of. you could do that in either javascript, vb, asp, .net, or sql. if you need help with one of these codes, ask again
as far as #3, i'm not sure what feilds will be used or checked with a procedure for this. could you please show us the table tructure that we will be working with? |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Complex date logic - Help needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|