Sql Loader 错误“令牌长于最大允许长度 258 个字符”
使用 SQL Loader 将数据加载到表时出现以下错误。
SQL*Loader-350: Syntax error at line 21.
Token longer than max allowable length of 258 chars
')
^
控制文件如下:
OPTIONS (SKIP = 1)
LOAD DATA
APPEND
PRESERVE BLANKS
INTO TABLE "INTL"
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
(
CO_BDI_INTERLOCUTOR CHAR(15),
NU_DOCUMENTO CHAR(17),
CO_TRATAMIENTO CHAR(1) "NVL(:CO_TRATAMIENTO,' ')",
DS_NOMBRE CHAR(50),
DS_APELLIDO_1 CHAR(50),
DS_APELLIDO_2 CHAR(50),
CO_CARGO CHAR(2) "NVL(:CO_CARGO,' ')",
DS_COMENTARIO CHAR(255) "NVL(:DS_COMENTARIO,' ')",
DS_ARE_FUN_ITL_GRC CHAR(100),
FX_INI_VIGENCIA CHAR(10),
FX_FIN_VIGENCIA CHAR(10) "NVL(:FX_FIN_VIGENCIA,' ')",
CO_CUC_CLIENTE CHAR(8),
CO_CUC_CABECERA CHAR(8),
CO_HITO CHAR(8),
DS_SIS_ORIGEN CHAR(4),
CO_INTERLOCUTOR CHAR(15),
CO_TIPO_DOC CHAR(1),
CO_IDIOMA CHAR(3)
)
问题似乎出在字段“DS_COMMENTARIO”,因为如果该字段为 NULL,我将用长度为 255 的空格替换数据。
我对其他表和控制文件也有类似的问题。
你能帮我解决这个问题吗?
谢谢, 萨维莎
I am getting the below error on loading the data to a table using SQL Loader.
SQL*Loader-350: Syntax error at line 21.
Token longer than max allowable length of 258 chars
')
^
The control file is as below:
OPTIONS (SKIP = 1)
LOAD DATA
APPEND
PRESERVE BLANKS
INTO TABLE "INTL"
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
(
CO_BDI_INTERLOCUTOR CHAR(15),
NU_DOCUMENTO CHAR(17),
CO_TRATAMIENTO CHAR(1) "NVL(:CO_TRATAMIENTO,' ')",
DS_NOMBRE CHAR(50),
DS_APELLIDO_1 CHAR(50),
DS_APELLIDO_2 CHAR(50),
CO_CARGO CHAR(2) "NVL(:CO_CARGO,' ')",
DS_COMENTARIO CHAR(255) "NVL(:DS_COMENTARIO,' ')",
DS_ARE_FUN_ITL_GRC CHAR(100),
FX_INI_VIGENCIA CHAR(10),
FX_FIN_VIGENCIA CHAR(10) "NVL(:FX_FIN_VIGENCIA,' ')",
CO_CUC_CLIENTE CHAR(8),
CO_CUC_CABECERA CHAR(8),
CO_HITO CHAR(8),
DS_SIS_ORIGEN CHAR(4),
CO_INTERLOCUTOR CHAR(15),
CO_TIPO_DOC CHAR(1),
CO_IDIOMA CHAR(3)
)
The problem seems to be with the field "DS_COMENTARIO" since I am replacing the data with spaces of length 255 if the field is NULL.
I have a similar problem with other table and Control file also.
Could you please help me with this?
Thanks,
Savitha
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
DS_COMMENTARIO CHAR(255) "NVL(:DS_COMMENTARIO,LPAD(' ', 255, ' ')",
它基本上将 1 个字符的字符串填充为 255 个字符。
Try
DS_COMENTARIO CHAR(255) "NVL(:DS_COMENTARIO,LPAD(' ', 255, ' ')",
It basically pads a 1 Character string out to 255 characters.