子
子龙
Unregistered / Unconfirmed
GUEST, unregistred user!
一WJPZ.DBF数据库有四个字段:kmdm (C),kmmc (C),jfje (N),dfje (N)。
现要求按KMDM的前三位字符相同的记录汇总起来,用SELECT怎么写?我用
SELECT SUBSTRING(KMDM FROM 1 FOR 3) AS KMDM,KMMC,SUM(JFJE) AS JFJE,
SUM(DFJE) AS DFJE FROM WJPZ GROUP BY SUBSTRING(KMDM FROM 1 FOR 3)通不过。
现要求按KMDM的前三位字符相同的记录汇总起来,用SELECT怎么写?我用
SELECT SUBSTRING(KMDM FROM 1 FOR 3) AS KMDM,KMMC,SUM(JFJE) AS JFJE,
SUM(DFJE) AS DFJE FROM WJPZ GROUP BY SUBSTRING(KMDM FROM 1 FOR 3)通不过。