Oracle 控制文件错误:在 TERMINATED 和 ENCLOSED 字段后未找到终止符

发布于 2024-12-15 12:25:41 字数 439 浏览 1 评论 0原文

我通过控制文件将数据加载到 Oracle 10g 数据库,但收到此错误: 在 TERMINATEDENCLOSED 字段后找不到终止符

我的控制文件有分隔符的特定定义并包含:

FIELDS TERMINATED BY "," ENCLOSED by '"' TRAILING NULLCOLS

并且在错误的数据中,有一个大字段,我们可以在其中找到此文本:

after an "unauthorized" IOS upgrade 

我认为 TERMINATED BYENCLOSED 用于允许在字段中包含此类文本..我可以解决控制文件中的问题还是做我必须修复文本文件中的问题?

谢谢

I'm loading data to a Oracle 10g database through a control file and i get this error :
no terminator found after TERMINATED and ENCLOSED field

My control file has a specific definition of separators and enclosed :

FIELDS TERMINATED BY "," ENCLOSED by '"' TRAILING NULLCOLS

And in the data in error, there is a big field in which we can find this text :

after an "unauthorized" IOS upgrade 

I thought the TERMINATED BY and ENCLOSED were used to allow to have this kind of text in fields .. can i fix the problem in the control file or do i have to fix the problem in the text file ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫九 2024-12-22 12:25:41

Oracle 参考

ENCLOSED 字段通过跳过空白直到非空白来读取
遇到字符。如果该字符是分隔符,那么
数据读取到第二个分隔符。任何其他字符都会导致
错误。

如果两个分隔符相邻出现,则
数据中仅出现一次分隔符
价值。例如,'DON''T' 存储为 DON'T。然而,如果场
仅由两个分隔符组成,其值为空。

所以,使用:

"data","after an ""unauthorized"" IOS upgrade ","data",...

Oracle reference:

ENCLOSED fields are read by skipping whitespace until a nonwhitespace
character is encountered. If that character is the delimiter, then
data is read up to the second delimiter. Any other character causes an
error.

If two delimiter characters are encountered next to each other, a
single occurrence of the delimiter character is used in the data
value. For example, 'DON''T' is stored as DON'T. However, if the field
consists of just two delimiter characters, its value is null.

So, use:

"data","after an ""unauthorized"" IOS upgrade ","data",...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文