Skip to content
Advertisement

how to extract date from string in sql oracle 9i

I have column Explanation (VARCHAR2) in table:

I need query thats will answer “Does entry have a date in some form in it?” Yes / No for each entry. Is it possible on Oracle 9i?

I tried some solutions. But run into issue:

“ORA-01858: a non-numeric character was found where a numeric was expected”.

I don’t clearly now where datestamp will be in field.

select to_char(to_date(EXPLANATION, 'DD.MM.YYYY')) from PAYMENTDOC

Advertisement

Answer

You can do this using regular expression. Try below code :

Output :

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement