为何select SQL选择的结果不正确呢?
SELECT Gonghuo.htbh, Yw.xmmc, Kehu.khmc, Gonghuo.sxrq, Gonghuo.htje,;Gonghuo.sjje, Gonghuo.htghrq, Gonghuo.sjghrq, Rsstrs.xm, Gonghuo.fkff,;
Gonghuo.khbh, Gonghuo.xmbh, Yw.xiaosbh, Gonghuo.zhibdq, ;
IIF(DELETED(),.T.,.F.) as scbj;
FROM wanglai!gonghuo LEFT OUTER JOIN wanglai!kehu ;
ON Gonghuo.khbh = Kehu.khbh ;
LEFT OUTER JOIN wanglai!yw ;
ON Gonghuo.xmbh = Yw.xmbh ;
LEFT OUTER JOIN wanglai!rsstrs ;
ON Yw.xiaosbh = Rsstrs.bh ;
WHERE &tj;
ORDER BY Gonghuo.sxrq, Yw.xmmc ;
INTO CURSOR gh_linshi
执行此语句时,被删除的记录在临时表中显示出来,即临时表中所有记录的scbj均为.F.
如果我将deleted()改为deleted('gonghuo')时,临时表中所有记录的scbj都成了.T.
我想让被删除的记录在临时表中的scbj为.T.,而未删除的记录的scbj为.F.
请高手帮我看看是怎么回事,先谢谢。