以下是引用wp231957在2013-6-7 08:42:57的发言:
SELECT SUM(dj*shl2) FROM (SELECT spbh,dj, SUM(shuliang) AS shl2 FROM liushuiw GROUP BY spmc HAVING shl2>0 into table T1)
SELECT SUM(dj*shl2) FROM (SELECT spbh,dj, SUM(shuliang) AS shl2 FROM liushuiw GROUP BY spmc HAVING shl2>0) into table T1
SELECT SUM(dj*shl2) FROM (SELECT spbh,dj, SUM(shuliang) AS shl2 FROM liushuiw GROUP BY spmc HAVING shl2>0) T1
以上诸条语句在vf6下均提示语法错误
比较闹心的是 如何才能让它提示哪里出错了呢 就笼统的一句语法错误
第一、二句肯定是错的,因为不符合我刚刚说的“FROM子句后的子查询一定要起一个临时名”的规则。第三句不能用可能是VFP6.0的问题了,不支持这种语法。