oracle - How to use sub queries while inserting record into db using cx_Oracle in python? -
i need add symbol value of self.wrkarea
variable this
(select chr(182) dual) || self.wrkarea || (select chr(182) dual)
i.e. ¶workarea¶
result. how substitute in following query?
cursor.execute("""insert mdp_err_master (markerid, filename, errorcode, userid, checkedby, checkeddt, status, comments, x1, y1, z1, x2, y2, z2, recno, project_code, src_acc_num, workarea, configid, elementid) values (:markerid,:shapename,:errcode,'0',:sysid,sysdate,'open',:usercomment,:x1,:y1,0,:x2,:y2,0,1,:jobno,:srcacnum,:workarea,0,0)""", {"markerid" : markerid, "shapename" : str(errormarkerlayer.name()), "errcode" : errcode , "sysid" : self.sysid , "usercomment" : str(comments), "x1" : startpnt[0], "y1" : startpnt[1], "x2" : endpnt[0], "y2" : endpnt[1], "jobno" : self.jobno, "srcacnum" : src_acnum, "workarea" : self.wrkarea })
try changing :workarea
chr(182) || :workarea || chr(182)
in values
clause.
Comments
Post a Comment