Hi guys,
I'm struggling with a ORA-01861 that is probably very simple but I just can't see it.
SELECT userid AS MSKEYVALUE
FROM tmpREPcutover
WHERE userid = ANY
(SELECT mcmskeyvalue AS MSKEYVALUE
FROM idmv_entry_simple T1
INNER JOIN idmv_vallink_ext T2
ON T1.mcmskey = T2.mskey
WHERE T1.mcentrytype = 'MX_PERSON'
AND (T2.mcattrname = 'MX_VALIDFROM'
AND TO_DATE(T2.mcvalue, 'YYYY-MM-DD') <= sysdate)
);
is returning the usual literal error. I get it for one dataset but don't seem to get it for another very similar dataset.

I tried running the following to see if I could find a string that was causing me the issue.
SELECT mcattrname,
mcvalue,
to_date(mcvalue, 'YYYY-MM-DD'),
sysdate
FROM idmv_vallink_ext
WHERE mcattrname = 'MX_VALIDFROM'
AND TO_DATE(mcvalue, 'YYYY-MM-DD') <= sysdate;
But this second query runs fine, which makes me think there is something wrong with the syntax... but I can't see it.

Any help, or point in the right direction would be great.
Thanks!