Wm_concat problem record of single-column merging function of Oracle function

Source: Internet
Author: User
Tags dname

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.