请教高手,谢谢。
大家讨论一下为什么?
for j=1 to 5
select count(XH)
into :coun
from PXSDM //基本表,xh ,lxnd,xsxz等项
where XSXZ='111'and cast(LXND as int)>=:nd and :nd -cast(RXND as int) +1= :j
using sqlca;
在这个程序中运行结果不正确,但是把where条件中的:j变成具体的数值结果正确,
select count(XH)
into :coun
from PXSDM //基本表,xh ,lxnd,xsxz等项
where XSXZ='111'and cast(LXND as int)>=:nd and :nd -cast(RXND as int) +1= 1
using sqlca;
select count(XH)
into :coun
from PXSDM //基本表,xh ,lxnd,xsxz等项
where XSXZ='111'and cast(LXND as int)>=:nd and :nd -cast(RXND as int) +1= 2
using sqlca;
.........
为什么????
请指教