Skip to content
Advertisement

Tag: cx-oracle

SQL command not properly ended in Python OracleSQL

I’m having some trouble with SQL code that works when I run it in DBeaver, but when I execute it with cx_Oracle it comes up with the error of: The python code is good, but I’m not much of a SQL programmer, so maybe someone can look to see if there is any obvious coding errors. It’s just weird that

Python Cx_Oracle select query binding a tupled list with WHERE IN clause

Due to Oracle’s 1000 “IN” clause limit, one workaround is to use list tuples. I am attempting this in Python but cant seem to bind the list tuple correctly. My code: This gives me error: cx_Oracle.NotSupportedError: Python value of type tuple not supported. Whats the possible workaround for this error? Thanks Answer Your python is generating the following query string…

Binding dates to SQL in Python for cx_Oracle

I am using the following query to select logs fro a logs table. I have the following dictionary of parameters: and executing the query as follows : Now the problem is I am not getting any values for this date range. But if I execute the query in Oracle, by specifying the dates, it is working. What is wrong here

ORA-00942 with cx_Oracle

I’m trying to run any command on an autonomous database from oracle cloud after establishing connection but they don’t seem to work. cursor.execute(“select * from admin.customers”) gives me the …

Advertisement