Are the results needed toward the bottom of this post, even possible? I hope I've explained it so it makes sense.
TABLES:
MAIN TABLE
ID TITLE EFFECTIVE_DATE (This is in the table as string and not date)
1 Placement Testing 10/01/2015
1 Testing 10/01/2014
1 Test 10/01/2012
JOIN TABLE
ID TERM (1st character is for 2000 and characters in position 2 and 3 is the year)
1 1175 (2017)
1 1145 (2014)
1 1135 (2013)
Result Needed (I only want the MAIN TABLE's last effective date year title < JOIN TABLE'S term year)
ID TERM TITLE
1 1175 (2017) Placement Testing - 2015 is the MAIN TABLE's last effective date year < 1175 (2017)
1 1145 (2014) Test - 2012 is the MAIN TABLE's last effective date year < 1145 (2014)
1 1135 (2013) Test - 2012 is the MAIN TABLE's last effective date year < 1135 (2013)
Any help is greatly appreciated!
TABLES:
MAIN TABLE
ID TITLE EFFECTIVE_DATE (This is in the table as string and not date)
1 Placement Testing 10/01/2015
1 Testing 10/01/2014
1 Test 10/01/2012
JOIN TABLE
ID TERM (1st character is for 2000 and characters in position 2 and 3 is the year)
1 1175 (2017)
1 1145 (2014)
1 1135 (2013)
Result Needed (I only want the MAIN TABLE's last effective date year title < JOIN TABLE'S term year)
ID TERM TITLE
1 1175 (2017) Placement Testing - 2015 is the MAIN TABLE's last effective date year < 1175 (2017)
1 1145 (2014) Test - 2012 is the MAIN TABLE's last effective date year < 1145 (2014)
1 1135 (2013) Test - 2012 is the MAIN TABLE's last effective date year < 1135 (2013)
Any help is greatly appreciated!