I have this query that produces what I want within a year. All the terms for the current year. I also want to add another statement where, when the month of December is current I want now the future term that contain 2025. I made a separate query identifying those terms but not sure on how I can “mesh” them together to produce the current terms but switch to future term when the month of December is current. Thanks in advance
Query#1
SELECT DISTINCT AL1.academic_period AS "TERM"
FROM odsmgr.MST_GENERAL_STUDENT AL1
WHERE (to_number(substr(AL1.academic_period, 1, 4)) = EXTRACT(YEAR FROM SYSDATE));
TERM
202480
202410
202413
202460
202416
Quer#2
SELECT DISTINCT al1.academic_period
FROM odsmgr.mst_general_student AL1
WHERE (to_number(substr(AL1.academic_period, 1, 4)) = EXTRACT(YEAR FROM SYSDATE) + 1);
TERM
202510
202560
202580