if( or(D3 = "商业饮片", D3 = "自制饮片"), "", "AND (GMPNAME = '" + E3 + "' or find(LEFT(GMPNAME,3), E3) > 0 OR IF(GMPNAME = '驴胶补血颗粒',FIND('补血',E3)>0,"")" )一直提示非法公式以下sql供参考:若条件成立后正常的sql为 AND (GMPNAME = E3 OR FIND (LEFT(GMPNAME,3), E3) > 0 OR (CASE WHEN GMPNAME = '驴胶补血颗粒 THEN FIND('补血',E3) ELSE 0 END)>0)