I'm getting an error when inserting None values into oracle in the following way:
host = ('value1', 'value2', None, None)
sql_insert = "INSERT INTO sm9_data_hostname (field1, field2, field3, field4) VALUES ( :1, :2, :3, :4)"
conn_link.execute(sql_insert, host)
connection.commit()
The error is: cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number
The insert works if I use 'Null' instead of None. I can't see what's wrong with this query as the parameters should replace the none with a Null. Or is this the wrong assumption?
Thanks, Isaac
:field1, and passing as a dictionary?