In the WHERE clause of a procedure:
ANDÂ TO_DATE(loc.LAST_UPDATE_DATE,'DD-MM-YYYY') between TO_DATE(from_date,'DD-MM-YYYY') and TO_DATE(sysdate,'DD-MM-YYYY');
This gives me an error as:
ORA-01843: not a valid month
To use this i need to alter the session everytime I try to run the procedure.
alter session set nls_date_format = 'DD-MM-YYYY';
Is there any other way where i can run the procedure without passing the alter command every time I run the procedure?