ORA-00932: inconsistent datatypes: expected - got CLOB
如果你在sql语句中使用了wm_concat,那么你需要注意了,这个函数是oracle的内部函数,其中有的版本安装了 ,有的版本没有安装,所以尽量少使用这个函数,当然,在使用了这个函数的时候报错了,我们需要对其进行转换,因为类型问题导致了上面的报错。
所以可以在wm_concat外围加一个to_char进行转换,clob和varchar之间进行转换
eg: to_char(wm_concat(...))
In releases 10.2.0.5and11.2.0.2, creating a view using the WMSYS.WM_CONCAT function fails. In10.2.0.5/11.2.0.2 it returns CLOB
In releases 10.2.0.4,11.1.0.7and11.2.0.1, the view compiles successfully. In10.2.0.4/11.1.0.7/11.2.0.1 it returns VARCHAR2
下面为版本号查询语句
select * from v$version;