ORA-01489: result of string concatenation is too long
ORA-01489: result of string concatenation is too long
Cause: String concatenation result is more than the maximum size.
Action: Make sure that the result is less than the maximum size. Reference:
http://nimishgarg.blogspot.com/2012/06/ora-01489-result-of-string.html
http://docs.oracle.com/cd/B19306_01/server.102/b14219/e900.htm Example:
SQL> SELECT LPAD('x',4000,'x') || LPAD('x',4000,'x') || LPAD('x',4000,'x') FROM DUAL;
SELECT LPAD('x',4000,'x') || LPAD('x',4000,'x') || LPAD('x',4000,'x') FROM DUAL
*
ERROR at line 1:
ORA-01489: result of string concatenation is too long Problem Description:
The problem with this query is with the use of CONCAT operator (||). e.g.: select char1 || char2 from dual
Concat operator returns char1 concatenated with char2. The string returned is in the
same character set as char1. So here concat operator is trying to return varchar2,
which has limit of 4000 characters and getting exceeded. This problem may also come when we try to CONCAT a VARCHAR2 with CLOB.
e.g.: select char1 || clob from dual So here we can simply convert its first string to CLOB and avoid this error.
After converting first string to CLOB, CONCAT operator will return string of CLOB type Solution:
SELECT TO_CLOB(LPAD('x',4000,'x')) || LPAD('x',4000,'x') || LPAD('x',4000,'x')
FROM DUAL
ORA-01489: result of string concatenation is too long的更多相关文章
- Effective Java 51 Beware the performance of string concatenation
Using the string concatenation operator repeatedly to concatenate n strings requires time quadratic ...
- StringBuffer使用append提示String concatenation as argument to 'StringBuffer.append()' call
昨天发现一个IDE提示: String concatenation as argument to 'StringBuffer.append()' call less... (Ctrl+F1) Repo ...
- C. The Smallest String Concatenation
C. The Smallest String Concatenation time limit per test 3 seconds memory limit per test 256 megabyt ...
- codeforces 632C The Smallest String Concatenation
The Smallest String Concatenation 题目链接:http://codeforces.com/problemset/problem/632/C ——每天在线,欢迎留言谈论. ...
- CodeForces 632C The Smallest String Concatenation//用string和sort就好了&&string的基础用法
Description You're given a list of n strings a1, a2, ..., an. You'd like to concatenate them togethe ...
- Educational Codeforces Round 9 C. The Smallest String Concatenation 排序
C. The Smallest String Concatenation 题目连接: http://www.codeforces.com/contest/632/problem/C Descripti ...
- codeforces 632C C. The Smallest String Concatenation(sort)
C. The Smallest String Concatenation time limit per test 3 seconds memory limit per test 256 megabyt ...
- Educational Codeforces Round 9 C. The Smallest String Concatenation —— 贪心 + 字符串
题目链接:http://codeforces.com/problemset/problem/632/C C. The Smallest String Concatenation time limit ...
- Educational Codeforces Round 9 C. The Smallest String Concatenation(字符串排序)
You're given a list of n strings a1, a2, ..., an. You'd like to concatenate them together in some or ...
随机推荐
- 整合git与wingIDE(代码下载)
通过多次被IDE的闪退崩溃甚至无教程调教后,我深刻认识到开发wingIDE这种IDE的小公司,在很多功能方面就是个坑…… 所以,如果你的电脑比较好,运行pycharm无压力,建议略过此文,直接去用py ...
- CListCtrl总结.xml
pre{ line-height:1; color:#d1653c; background-color:#000000; font-size:16px;}.sysFunc{color:#566d68; ...
- 【LeetCode】104 - Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the long ...
- IIS启动出错解决方法
IIS出现server application error,最终解决办法2007年10月30日 星期二 20:38Server Application Error The server has enc ...
- 项目 erlang启动时死循环
机子里的otp是新装的 看了一下main 是在util:ensure_started一堆app的时候死讯了, 按照顺序是sasl crypto asn1 public_key ssl 发现是publi ...
- 数据库中使用 Synonym和openquery
如果,你想在一台数据库服务器上,查询另一个台数据服务器的数据该如何做呢?如果,你想在同一台数据服务器上,在不同的数据库之间查询数据,又该怎么办呢?那就让我为你介绍Synonym和openquery吧. ...
- JavaScript 继承方式详解
js继承的概念 js里常用的如下两种继承方式: 原型链继承(对象间的继承)类式继承(构造函数间的继承) 由于js不像java那样是真正面向对象的语言,js是基于对象的,它没有类的概念.所以,要想实现继 ...
- NLP初步
[NLP初步] NLP是Natural Lanuage Process的缩写.搜索引擎可以通过关词匹配和完成很多的任务, 比如话题搜索(搜索包含律师, 法院, 控告等词的文档), 但是搜索引擎无法理解 ...
- <<海闻电子发票接口 ESB 封装文档>>
<<海闻电子发票接口 ESB 封装文档>> 章节目录结构: 发票验证接口 发票开具接口 ESB请求地址: 发票验证接口: http://10.15.22.120:8866/42 ...
- *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
kei编译时提示: *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL *** WARNING L1:reference made to unresolved ext ...