SQL query help
Posted on 2014-03-03
I have one table with two cols
MK109 - Sales Training (All Staff)
What I want is to
1. update col2 with date format
2. If there is any data other than dd/mm/yyyy format (regex) make it to null
How do i do that.
I started off but couldnt complete...
update Table1 set col2=(select to_char(mydate,'DD-MON-RR HH:MI') from (
select to_date(col1,'DD-MM-RRRR') mydate from Table1) where (rowid=Table1.rowid and col1 != null));
The above query updates every row to null...
Can you guys help me?