标题:Oracle ORA-01948:identifier's name length(%s)exceeds maximum(%s)报错的解决
作者:
lōττéry©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.]
*** 今天将一个大结果集建立一张普通表时 报
ORA
-
01948错
*** 如下是简版介绍
SQL>
2
create table t_1 as
3 select
4 temp.EMP_ID,
5 temp.EMP_NAME,
6 temp.ID_CARD_NO,
7
sum(PER_PAY_FEES_AMO+COM_PAY_FEES_AMO)
** 等字段
8
from
...... ** 等信息
ORA
-
01948
:
identifier
's name length (38) exceeds maximum (30)
SQL>
错误介绍:
[oracle@xcf ~ ]$ oerr ora 01948
01948, 00000, "identifier's name length (%s) exceeds maximum (%s)"
// *Cause: A name has been specified that is too long.
// For example, dbms_session.is_role_enabled() specifies a role name
// that is too long.
// *Action: Change the application or command to use a correct identifier.
[oracle@xcf ~ ]$
01948, 00000, "identifier's name length (%s) exceeds maximum (%s)"
// *Cause: A name has been specified that is too long.
// For example, dbms_session.is_role_enabled() specifies a role name
// that is too long.
// *Action: Change the application or command to use a correct identifier.
[oracle@xcf ~ ]$
根本原因:
*** In oracle database, all the object names must not be greater than 30 characters in length.
查看sum(PER_PAY_FEES_AMO+COM_PAY_FEES_AMO)字段的长度 ... 38字符很符合报错
SQL>
SELECT lengthb('sum(PER_PAY_FEES_AMO+COM_PAY_FEES_AMO)') FROM dual ;
LENGTHB('SUM(PER_PAY_FEES_AMO+
------------------------------
38
查看长度为30字符的字段,确认是否不报错
SQL> SELECT lengthb('sum(SF_SB_SUM_AMO+FLF+FLF+FLF)') FROM dual ;
LENGTHB('SUM(SF_SB_SUM_AMO+FLF
------------------------------
30
SQL>
*** 创建成功..
SQL>
2
create table t_1 as
3 select
4 temp.EMP_ID,
5 temp.EMP_NAME,
6 temp.ID_CARD_NO,
7
sum(SF_SB_SUM_AMO+FLF+FLF+FLF)
** 等字段
8
from
......
** 等信息
Table created
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28602568/viewspace-1426422/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28602568/viewspace-1426422/