I spent most of yesterday looking at questions here and around the web and Couldn't really, still, figure out what I'm missing. I'm pretty sure it has to be something really stupid but I'm burn out by now.
So, code:
temp_table_name = 'COMPTEMP.i'+todo_name+'_MSGRUN'
sql_create_table = "CREATE TABLE "+temp_table_name+" (CL VARCHAR2(255)) NOLOGGING NOCOMPRESS NOCACHE NOPARALLEL MONITORING"
DB_GATEWAY.execute(sql_create_table)
(this gets created ok)
sql_fill_table_header = """INSERT INTO """+temp_table_name+""" (CL) VALUES (:1)"""
sql_fill_table_build = []
sql_fill_table_build = ['1', '2', '3', '4', '55']
DB_GATEWAY.executemany(sql_fill_table_build, sql_fill_table_header)
(this goes now to a session pool guard, which ends up below)
def executemany( self, db_operation, db_prepare ):
self.cursor_.prepare(db_prepare)
self.cursor_.executemany(None, db_operation)
When running this I get the fopllowing error
OracleException: ORA-01036: illegal variable name/number
If I remove the value '55' from the list, all others get inserted fine, so looks like it's accepting only values of 1 char length.
When I run each statement via execute() alone they get inserted. I'm pretty sure it has to do something with either the code or how Oracle works with positional arguments, but I'm lost by now.
Appreciate the help !