我在元组中有来自oracle的记录,我试图用python在snowflake中执行bulkinsert语句,但我面临转义字符问题。你知道吗
输入:
('Sample',1234,"Here is escape' need",9700,'final')
输出:
('Sample',1234,'Here is escape'' need',9700,'final')
我曾尝试使用正则表达式捕获双引号之间的字符串,并尝试使用replace函数,但没有成功。你知道吗
输入:
('Sample',1234,"Here is escape' need",9700,'final')
输出:
('Sample',1234,'Here is escape'' need',9700,'final')
你为什么要修改任何东西?元组可以通过参数绑定直接插入: 你知道吗
您可以按coma拆分值,并在部分上迭代搜索带有双引号的部分并替换它们:
结果:
相关问题 更多 >
编程相关推荐