Error: exceeds maximum length limit of 255 characters while inserting data from Oracle to Snowflake?

Error: exceeds maximum length limit of 255 characters while inserting data from Oracle to Snowflake?

(代表 Snowflake 用户提交)


我在将数据从 oracle 插入到 snowflake 时遇到以下错误。有谁知道为什么会报错?

Note: Error column defined "VARCHAR" datatype

我知道在将显式长度指定为 VARCHAR(255) 的情况下,可能会遇到错误,因为(根据 Snowflake 文档):"If a length is not specified, the default is the maximum length."

单字节:16,777,216

多字节:介于 8,388,608(每个字符 2 个字节)和 4,194,304(每个字符 4 个字节)之间

我听说在 Oracle 中,我可以将数据类型和长度更改为 VARCHAR2(4000),或者在 Snowflake 中更改为默认 VARCHAR 而无需指定长度。

我有 table 雪花,如下所示

CREATE OR REPLACE TABLE test1
(
test1 varchar
)


INSERT INTO test1 values(<values from oracle cursor>)

执行 INSERT 查询时出现错误 - Error: exceeds maximum length limit of 255 characters


(用户提出的答案)

Its due to the escape character in the string, Thanks all for your valuable input.


但是 - 是否有任何其他建议或更有效的方法来解决用户提出的问题?谢谢!