Reputation: 11
I am trying execute below block of code with cx_oracle by bind variables, but getting below mentioned error everytime. Not sure what is missing.
Code :
a = input("Please enter your name ::")
conn = cx_Oracle.connect('hello/123@oracle') cur = conn.cursor()
text1 = "select customer from visitors where name = :myvalue;" cur.execute(text1,myvalue=str(a))
ERROR observed : cx_Oracle.DatabaseError: ORA-00933: SQL command not properly ended
Upvotes: 0
Views: 99
Reputation: 10621
Remove the semi-colon at the end of your SQL statement.
Upvotes: 0