Greetings,
I need help figuring this one out. For every row in Table 1, I need to check if the Service date falls between the EFF Date and TERM Date of every row in Table 2 based on the matching subscriber ID. Any help is appreciated. The result should be represented in a Y/N indicator.
Regards
TABLE 1
Service_Date Subscriber_Name_First Subscriber_Name_Last Subscriber_ID_Code
8/16/2016 SMITH JOHN 456981235
5/10/2016 SMITH JOHN 456981235
9/6/2017 SMITH JOHN 456981235
7/16/2016 SMITH JOHN 456981235
4/16/2016 SMITH JOHN 456981235
12/16/2015 SMITH JOHN 456981235
TABLE 2
SBSB_ID SBSB_LAST_NAME SBSB_FIRST_NAME MEPE_ELIG_IND MEPE_EFF_DT MEPE_TERM_DT
456981235 SMITH JOHN N 1/1/1920 5/31/2006
456981235 SMITH JOHN Y 6/1/2006 7/31/2006
456981235 SMITH JOHN N 8/1/2006 9/30/2013
456981235 SMITH JOHN Y 10/1/2013 7/31/2016
456981235 SMITH JOHN N 8/1/2016 12/31/2199
Bookmarks