I have a column and its type is string and stores date something like this 03/1996 I want to convert that to 01-MAR-96?
how can I achieve that in ORACLE
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communitySQL> select to_char(to_date('03/1996', 'MM/YYYY'), 'DD-MON-YY') from dual;
TO_CHAR(T
---------
01-MAR-96
Based on that (if by convert you meant changing the data in the table):
update table tableX set columnX = to_char(to_date(columnX, 'MM/YYYY'), 'DD-MON-YY');
to_date(bogus_date, 'dd-MON-YY')
on that column, incurring a performance hit. The optimizer will also make stupid assumptions on that column, assuming there are values like '12-32-18' ... '12-99-18' etc between '12-31-18' and 01-01-18'. – Mark Stewart Dec 10 '18 at 16:08