0
|
用户k6280494Lv6资深互助发布于2023-5-15 08:55
|
|
-
随心灵(提问者)
- select a.S1 AS 横向经费 , b.S1 AS 纵向经费 ,
a.s1 + b.s1 as 科研经费总额,a.S2+b.S2 AS 到账经费
from
(select sum(htjf) s1,sum(dzjf) s2 from KY_hxxmsj
WHERE 1=1
${if(oop == \"00000001\" || len(oop) == 0,\"\",\" and dwh = \'\" +oop+ \"\'\")}
${if(len(tbsj_ks)==0 , \"\",\" and qdRQ>=\'\"+tbsj_ks+\"\' \")}
${if(len(tbsj_js)==0 ,\"\", \" and qdRQ<=\'\"+tbsj_js+\"\' \")})a,
(select sum(pzjf) s1,sum(dzjf) s2 from ky_zxxmsj
WHERE 1=1
${if(oop == \"00000001\" || len(oop) == 0,\"\",\" and dwh = \'\" +oop+ \"\'\")}
${if(len(tbsj_ks)==0 , \"\",\" and lxRQ>=\'\"+tbsj_ks+\"\' \")}
${if(len(tbsj_js)==0 ,\"\", \" and lxRQ<=\'\"+tbsj_js+\"\' \")} )b
-
随心灵(提问者)
- 斜杠是复制到这里自动多出来的。。。
-
用户k6280494 回复 随心灵(提问者)
- 先把条件注释了,一个条件一个条件测试
|
|