Different versions of the database direct this function return type inconsistency causes a program mapping error:
1. Error message:
cause:java.sql.sqlsyntaxerrorexception:ora-01790: An expression must have the same data type as the corresponding expression
2. Direct comparison of different versions
The 2.1 10g test is as follows
Select*from v$version;
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6D/13/wKioL1VcGKrSPclfAACjw7S-k1I581.jpg "style=" float: none; "title=" 10g_1.png "alt=" Wkiol1vcgkrspclfaacjw7s-k1i581.jpg "/>
SELECT Wm_concat (t.dname) from DEPT T
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6D/19/wKiom1VcFzDhwhULAAAtARKkBI0137.jpg "style=" float: none; "title=" 10g_2.png "alt=" Wkiom1vcfzdhwhulaaatarkkbi0137.jpg "/>
The 2.2 11g test is as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/13/wKioL1VcGKqAFZPeAACqn9TMmcc405.jpg "style=" float: none; "title=" 11g_1.jpg "alt=" Wkiol1vcgkqafzpeaacqn9tmmcc405.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6D/19/wKiom1VcFzDi1Zi7AAAZ2hiNSOI738.jpg "style=" float: none; "title=" 11g_2.png "alt=" Wkiom1vcfzdi1zi7aaaz2hinsoi738.jpg "/>
3. How to use the To_char function for conversion
SELECT To_char (Wm_concat (T.dname)) from DEPT T; SELECT To_char (SUBSTR (Wm_concat (t.dname), 1,2000)) from DEPT T;
This article is from my Tech blog blog, so be sure to keep this source http://programmer.blog.51cto.com/2859493/1653114
Wm_concat problem record of single-column merging function of Oracle function