【发布时间】:2016-03-04 07:07:04
【问题描述】:
我正在尝试运行 executemany 命令,但无法更新我的表。当我的 WHERE CLAUSE 中有一个参数时,我能够让它工作,但现在我有多个参数,表无法更新。
cur.executemany("""UPDATE orders SET (invested_amount, ex_order_id, \
time_acknowledged, execution_code) = \
(%(invested_amount)s, %(instruct_id)s, current_timestamp, \
%(execution_code)s) WHERE loan_id = %(loan_id)s and \
requested_amount = %(requested_amount)s and execution_code = NULL""",
order_list)
【问题讨论】:
-
您收到什么错误信息?请编辑问题以包含该信息。
-
我觉得应该是
execution_code IS NULL -
@bernie 就是这样。谢谢。
标签: psycopg2