Convert Varchar TO_DATE - HELP
Hello fellows,
In my work was installed ORACLE 11gR2 in Linux (RHEL5 64 bits)
In one table exist one filed VARCHAR2(8) with filled '20110101' (date string)
I tried execute one SQL Statement to catch an interval in this filed.
But, occurs message error: Literals in the input must be the same length as literals in the format string (with the exception of leading whitespace). If the
"FX" modifier has been toggled on, the literal must match exactly,
with no extra whitespace.
My SQL:
SELECT * FROM SE101
WHERE TO_DATE(E1_VENCTO, 'DD/MM/RR') >= TO_DATE(sysdate, 'DD/MM/RR')
And my NLS_LANGE (select * from v$nls_parameters) is:
NLS_DATE_FORMAT DD/MM/RR
I tryed change my SQL to:
SELECT * FROM SE101
WHERE TO_DATE(E1_VENCTO, 'YYYYMMDD') >= TO_DATE(sysdate, 'YYYYMMDD')
But still dosen't work.
Anybody can help me pls ?
Best regards,
Victor Peres