公式合法可就是传得值不对SQL("yuexin_dw"," SELECT max(ino_id) ino_id FROM FACT_SS_SUBJECT_ADJUST_MERGE where cCompanycode = '"+$p_companycode+"' and yearmonth = '"+CONCATENATE($p_year,$p_month)+"' and ctype='"+P4+"' AND cproperty='"+q4+"' ",1,1)+1
直接
max(ino_id) +1
你sql没取到数据,你把sql公式放在单元格看下值