Hi All ,
I want to execute the below query but the Oracle is throwing one error.
select comments as cm_comments from table1
union all
select text_action from table2
union all
select notes from table3
union all
select null from table4
Error that I got : ORA-01790: expression must have same datatype as corresponding expression
Here all the columns have the data type of CLOB except the column 'notes' in the table 'table3'. I know this is the reason to get the error but I need a work around for this. One solution I know is that type cast from clob to varchar but in this case there is a chance to trim out the data if the CLOB column contains data whose length is greater than maximum data length allocated to a VARCHAR column.
Please help me in this case to find out a solution for this problem.
Your timely help is well appreciated.
Thanks in advance.