I've a cron scheduled query which is failing with,
File "./run_ora_query.py", line 69, in db_lookup
cursor.execute(query, dict(time_key=time_key) )
cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number
where
>>> dict(time_key=time_key)
{'time_key': '12/10/2012 19:12:00'}
I'm using a .yaml file to update the last time_key after each query runs,
where the relevant parameters are,
{query: 'select session_mode, inst_id, user_name, schema_name, os_user, process_id,
process_mb_use, process_name, to_char(datet,''dd-mm-yyyy hh24:mi'') as DATETIME from os_admin.mem_usage where data > TO_DATE(:time_key,''dd-mm-yyyy hh24:mi:ss'') order by datet,
inst_id, os_user', time_key: '12/10/2012 19:12:00'}
Where is the culprit for this error?