【问题标题】:Trying to extract data through bind variables in cx_oracle python尝试通过 cx_oracle python 中的绑定变量提取数据
【发布时间】:2021-12-17 06:13:57
【问题描述】:

我正在尝试通过绑定变量使用 cx_oracle 执行下面的代码块,但每次都出现下面提到的错误。不确定缺少什么。

任何人都对此有想法

代码:

a = input("请输入您的姓名::")

conn = cx_Oracle.connect('hello/123@oracle') cur = conn.cursor()

text1 = "从 name = :myvalue 的访问者中选择客户;" cur.execute(text1,myvalue=str(a))

观察到错误: cx_Oracle.DatabaseError: ORA-00933: SQL 命令未正确结束

【问题讨论】:

    标签: python-3.x cx-oracle bind-variables


    【解决方案1】:

    删除 SQL 语句末尾的分号。

    【讨论】:

      猜你喜欢
      • 2015-12-28
      • 1970-01-01
      • 2011-11-02
      • 1970-01-01
      • 2018-01-07
      • 2011-12-09
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多