select count(qfno) into 变量 from seal where DaysAfter(convert(date,whdate),convert(date,:whdate2))>90
whdate2 是字符型变量, 要统计库内字段 whdate 和 whdate2 相差90天以上的QFNO 如何写呢?
------解决方案--------------------
select count(qfno) into 变量 from seal where DateDiff(d,convert(date,whdate),convert(date,:whdate2))>90
------解决方案--------------------
你语句的条件就是SQL里的条件语句,只是把PB里的变量带进去就行了