Hi I am using the below query to get the date in the format 'DD-MM-YYYY' from a CLOB field from ORACLE Toad.
Select ID, NVL(TO_CHAR(xmltype(XML_RAW).extract('//ROWSET//ROW//MJR_V//MJR_V_ROW//EARLIEST_ACCEPT_DATE/text()').getStringVal(), 'DD-MM-YYYY'),'')
AS Dateformat from table1 where ID = 102
It thorws error:
ORA:01722: Invalid number
But if I use the above query direct DB columns (NOT CLOB FIELDS) then it executes fine.
Select ID, NVL(TO_CHAR(Start_Date, 'DD-MM-YYYY'),'')
AS Dateformat from table1 where ID = 102
Please let me the solution.