Hi All,
Thanks for looking into this.. I have searched and found some alternatives to convert the CLOB field or column in Oracle and I thought this should be working..but I get this weird error 
Error: ORA-03170: deadlocked on readable physical standby (undo segment 1206)
 
Oracle Table: XYZ
Column Name is Textvalue
Data Type is CLOB
Nullable Yes
 
what options did you try?
1). to_char(substr(textvalue,1,1000)) AS Required_Output,
2).Cast(Substr(textvalue,1,1000) as Varchar(1000)) AS Required_Output,
3).dbms_lob.substr(textvalue,1000,1) as Required_Output,
4).substr(NVL(to_char(substr(TRIM(textvalue),1,2000)),'Not Available'),1,1000) AS Required_Output,
5).substr(textvalue,1,1000) AS Required_Output
 
None of the above is working .. I have used /*+ materialize * in the select clause statements which are used as with 
1) with Test AS (
   select /*+ materialize * * from
  (
   select
  ),
),
Test2  AS
(
),
Test3 AS
(
),
etc ....
some of these Test1 Test2 Test3 Etc... has the materialize hint
so something is causing that error - because it should work if this materialize is not in the query
any guidance please.....