I'm trying to get a row result from a table. I created a stored procedure IN SQL DEVELOPER where I can filter between 2 dates
i have the next DATE in my table
FECHACARGA - 17/NOV/2020
In the sp im trying to compare 2 strings that comes like this:
fechaIni IN VARCHAR2, fechaFin IN VARCHAR2,
I make this to get the row that matches.
SELECT COUNT(1)
INTO V_TOTAL
FROM Z_DOMI2_IB_SERVICE_STATUS
WHERE CLIENTE = clientId AND
TIPOARCHIVO = tipoDeArchivo AND
ESTADO = estadoArchivo AND
TO_CHAR(FECHACARGA, 'DD-MM-YYYY') BETWEEN TO_CHAR(TO_DATE(fechaIni, 'DD-MM-YYYY'), 'DD-MM-YYYY')
AND TO_CHAR(TO_DATE(fechaFin, 'DD-MM-YYYY'), 'DD-MM-YYYY');
This doesn't work, this gives me nothing just blank.
Thanks!
datedata type columns