this is going a bit hairy.
1. I'm running against the TimesTen database, which is somewhat different from regular Oracle db.
b. the "insert" statements with regular subs variables ( not TS) work fine.
c. the "insert" statements with TS as literal work fine too.
d. the "insert" with TS as a subs variable - do NOT:
create table test(ts timestamp, one unmber);
in cx_oracle:
cursor.execute("INSERT INTO test VALUES (TIMESTAMP ':ts',:one,2)", one=1, ts='2007-01-20 12:45:23' )
cursor.execute("INSERT INTO test VALUES (TIMESTAMP ':ts',:one,2)", one=1, ts='2007-01-20 12:45:23' )
cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number
cursor.execute("INSERT INTO test VALUES (TIMESTAMP '2007-01-20 12:45:23',:one,2)", one=1)
<no error>
the ultimate goal is to get either datetime.datetime.now() type or string passed to the "insert"
thank you
Message was edited by: _AZ_
syntax highlight