0

我需要self.wrkArea像这样添加一个带有变量值的符号

(select chr(182) from dual) || self.wrkArea || (select chr(182) from dual)

即将¶workarea¶是结果。如何在以下查询中替换它?

cursor.execute("""insert into 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
         })
4

1 回答 1

0

尝试在子句中更改:workarea为。chr(182) || :workarea || chr(182)values

于 2013-05-03T11:36:03.463 回答