Hi Pallavi,
Since the data in the table is of NVARCHAR datatype, the TO_CHAR function would fail.
It issue can be resolved in the below following way:
create table date_test(col1 nvarchar(10));
insert into date_test values('2015-10-09');
select to_char(to_date(col1, 'YYYY-MM-DD'), 'YYYYMMDD')
from date_test;
You need to use to_char(to_date(col1, 'YYYY-MM-DD'), 'YYYYMMDD')
Regards,
Anil