Re: [cx-oracle-users] Oracle Error :: ORA-01484 arrays can only be bound to PL/SQL statements
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2011-12-01 12:19:12
|
2011/12/1 Wong Wah Meng-R32813 <r3...@fr...> > It looks like we have no other way except to change our SQL not to use > statements like "in (:1)"? Exactly. Oracle (the SQL server, not cx_Oracle) does not allow list of values in bind variables. Use something like: "... where x in (%s) ..." % ', '.join(list_of_values) If it worked with oracledb, it's probably because oracledb does not really use bind variables, but internally format the query with %s or something similar. cx_Oracle really passes the sql string to the Oracle server unmodified, so you are subject to the limitations of the Oracle server. -- Amaury Forgeot d'Arc |