Z
zyt_1978
Unregistered / Unconfirmed
GUEST, unregistred user!
select M.*, <br> (select HH from CGDD where CGDD.ZBID=M.ZBID and CGDD.HH=M.HH) as TMP, <br> (select sum(SL) from CGSH where DDID=M.ZBID and HPID=M.HPID) as aSHSL, <br> case M.SL > aSHSL when 1 then M.SL - aSHSL else 0 end as aMSSL, <br> --iif(M.SL > aSHSL, M.SL - aSHSL, 0) as aMSSL, <br> H.BH as aBH, H.PM as aPM, H.DW as aDW <br> from CGDD M inner join HP H on M.HPID=H.ID <br> 里面的iif已经让我屏蔽了<br>但是 <br> 第 4 行: '>' 附近有语法错误。 <br> 后面还提示 列名 'aSHSL' 无效。