我收到以下错误:
query=query%db.literal(args)
ValueError: Unsupported Format character 'P' (0x50)
这是我从 python 执行的查询(注意,phraseList 是一个列表)
for elem in phraseList:
cursor.execute("""SELECT PHRASE,COUNT(CASEID) FROM TEST.NER WHERE LABEL LIKE '%PART%' \
AND CASEID IN (SELECT DISTINCT CASEID FROM TEST.NER WHERE LABEL LIKE '%CONDITION%'\
AND PHRASE LIKEPHRASE LIKE %s""",(elem,))