我在python中有一个查询:
ssim_group = [S1200,S1300]
query = '''select WIPMessageCnt from waferdata where recipename in (%s) and equipment = ?
and runtype = ? order by stopts desc limit 1''' % (','.join(ssim_grp))
打印查询
当前结果
select WIPMessageCnt from waferdata where recipename in (S1200,S1460) and equipment = ? and runtype = ? order by stopts desc limit 1
预期结果应该是这样的
select WIPMessageCnt from waferdata where recipename in ('S1200','S1460') and equipment = ? and runtype = ? order by stopts desc limit 1
当我尝试将它们放入SQL的IN参数中时,该列表中的每个元素都应该有一个quation。我怎样才能做到这一点?在
相关问题 更多 >
编程相关推荐