Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01861

Pat.UKAug 24 2016 — edited Aug 25 2016

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.

pastedImage_0.png

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.

pastedImage_4.png

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

Thanks!

This post has been answered by HarbourGhost on Aug 24 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2016
Added on Aug 24 2016
11 comments
900 views