事例:
="SELECT cVouchID,dVouchDate,cSSCode,cDigest,iAmount_f,cFlag,cDwCode FROM Ap_CloseBill where dVouchDate>='"&日期&"' and cSSCode in ('204','301','303','304') and cFlag = 'AR'"
我是用的是 勾了使用公式选项,正常语句应该是:
SELECT cVouchID,dVouchDate,cSSCode,cDigest,iAmount_f,cFlag,cDwCode FROM Ap_CloseBill where dVouchDate>='日期' and cSSCode in ('204','301','303','304') and cFlag = 'AR'
差别就是日期前的""&和之后的&""(日期是我设定的变量)
和写excel公式一样,这样应该能看明白吧
|