Skip to content
Advertisement

Filter out records that are not in this date format oracle

How do i filter records that can only be converted to date using to_date('31-May-2019 00:00:00', 'DD-MON-YYYY HH24:MI:SS')

from the above sample query i am expecting results below

how do i achieve this in oracle.

Reason why i want to do this: i am receiving raw data and loading it to a table before cleaning them to insert clean data to a final table.

Advertisement

Answer

You can use an inline function to check if the date is valid. Like this:

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