Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Record of WM_CONCAT problem of single column merge function of Oracle function

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Different versions of databases directly result in program mapping errors due to inconsistent return types of this function:

1. Error message:

Cause: java.sql.SQLSyntaxErrorException: ORA-01790: expression must have the same data type as the corresponding expression

two。 Compare different versions directly

2.1 10g test is as follows

SELECT*FROM V$VERSION

SELECT WM_CONCAT (T.DNAME) FROM DEPT T

2.2 11g tests are as follows:

3. Fix method "convert using TO_CHAR function"

SELECT TO_CHAR (WM_CONCAT (T.DNAME)) FROM DEPT T select TO_CHAR (SUBSTR (WM_CONCAT (T.DNAME), 1mem2000)) FROM DEPT T

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report