该如何解决呢?
3 个解决方案
#1
代码怎么传不上去 再试试
#2
select
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID
#3
select
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID
#1
代码怎么传不上去 再试试
#2
select
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID
#3
select
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID
B.WJZSHID,
B.LXRMC,
B.ZH,
COUNT(B.LXRMC) SL,
SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2)) SFJE
from JSD A,
WLDW B,
HT_LY C
where
A.WLDW=B.CODE AND
A.HTH=C.HTH AND
A.HTH<90000000 AND
A.JSFKD_JLBH IS NULL
group by B.WJZSHID,
B.LXRMC,
B.ZH
having SUM(round(A.JSJE_17+A.JSJE_13+A.JSJE_QT+A.ZZSJE_17+A.ZZSJE_13+A.ZZSJE_QT-isnull(A.KKJE_FYHK,0),2))>@var1
order by B.WJZSHID