python操作sqlite报错:sqlite3.OperationalError: unrecognized token: “630008.OF”
分析:Ana:column的名字和值也得用引号包起来。INSERT INTO t_node_info (id, order) --> INSERT INTO t_node_info (“id”, “order”)
解决方案参考了 https://blog.csdn.net/zhengrong9/article/details/117333092
感谢。
我的代码示例:
dict_1r = obj_db[“dict_1r”]
for temp_key in dict_1r.keys() :
print( temp_key, dict_1r[temp_key] )
### 构造sql-table的 columns部分 ; + " " +
str_incert_key = str_incert_key +“'”+ temp_key + “',”
str_incert_value=str_incert_value +“'”+ dict_1r[temp_key]+ “',”
主要是解决FOF基金分析的sql数据库操作