你好,我想在SQL Server 2017中插入一个panda数据帧,我得到了这个
Lexical error at line 39, column 85. Encountered: "\r" (13), after : ""
在这一点上
cursor.execute("INSERT INTO dbo.someTable([records], [id], [userid], [originid],
[targetid],[targetname], [start_date], [end_date],[next_offset], [set_id])
values (?,?,?,?,?, ?,?,?,?,?)",
row['records'], row['id'],row['userid'], row['usernanme'],
row['originid'], row['targetid'], row['targetname'],
row['start_date'], row['end_date'], row['next_offset'], row['set_id'])
剩下的看起来还可以。。。据我所知这是对的?我做错什么了?Thnks公司
似乎有代码无法识别的换行符,这在unix和windows之间是不同的。”\r\n“代表windows/DOS,而“\n”代表unix,而“\r”代表mac。在windows/DOS上创建的内容传递到unix时将出现问题。你知道吗
重新格式化字符串,如下所示:
而且,参数周围似乎缺少括号。你知道吗
相关问题 更多 >
编程相关推荐