I need to return the total monthly data according to the parameter of MONTH and YEAR reported.
I did as follows:
WHERE a.dt_mesano_referencia between
to_date('01/'|| :NR_MES ||'/'|| :NR_ANO ||' 00:00:00', 'dd/mm/yyyy hh24:mi:ss') and
last_day(to_date( :NR_MES ||'/'|| :NR_ANO ||' 23:59:59', 'mm/yyyy hh24:mi:ss'))
But when I run, I get the following error return:
Is there another way to do it?