Hello. Please help as this is urgent. I have a DB2 table where I need to get the current month and year from table X. gl_date is defined as date and is 10 bytes. Here is the query I used. It works if I use the month or the year but not both. Thank you.
select *
from table x
where month(gl_date) = month(current date)
and year(gl_date) = year(current date);
select *
from table x
where month(gl_date) = month(current date)
and year(gl_date) = year(current date);