改为sql ="delete from [安装] where [业务编号] like "&id&" and [当前状态]='安装施工'" 试下看或把[ ]内的中文改为英文
sql ="delete from [安装] where [业务编号] like '*"&id&"*' and [当前状态]='安装施工'"
或者
sql ="delete from [安装] where instr([业务编号],'"&id&"')>0 and [当前状态]='安装施工'"
delete from xinghao where id not in ( select max(id) from xinghao group by xinghao ) -- 找到重复的xinghao内容的记录,并且删除之前出现的相同内容的记录,留下最后一次相同记录的内容