求大神看看哪里写错了?- ${if(len(sf)==0 || sf='中国',"select
- StatsMt,
- '全国',
- c.cpbusndivnm,
- operqtyyoy '业务量同比',
- operqtymom '业务量环比',
- rvnamtyoy '业务收入同比',
- rvnamtmom '业务收入环比',
- MonOperQty/100000000 as '业务量',
- MonOperRvnAmt/100000000 as '收入'
- from TB_FCT_SUM_DET_Mon a
- join (select distinct cpbusndivcd, cpbusndivnm from dash.tb_cde_cpbusntyp) c on c.cpbusndivcd = a.PostBusnTypCd
- where 1=1 and CpOrgCd = '00000000' and PostBusnTypCd
- !='999999'",
- if(sf in (tb_prt_cporg_all.provsignnm),
- "select
- StatsMt,
- b.provsignnm,
- cpbusndivnm,
- operqtyyoy '业务量同比',
- operqtymom '业务量环比',
- rvnamtyoy '业务收入同比',
- rvnamtmom '业务收入环比',
- MonOperQty/100000000 as '业务量',
- MonOperRvnAmt/100000000 as '收入'
- from TB_FCT_SUM_DET_Mon a
- join (select max(StatsMt) as maxStatsMt from TB_FCT_SUM_DET_Mon) a1 on a1.maxStatsMt = a.StatsMt
- join (select distinct provcporgcd, provsignnm from tb_prt_cporg_all) b on b.provcporgcd=a.CpOrgCd
- join (select distinct cpbusndivcd, cpbusndivnm from dash.tb_cde_cpbusntyp) c on c.cpbusndivcd = a.PostBusnTypCd
- where b.provsignnm='${sf}'",
- "select
- StatsMt,
- b.ctysignnm,
- cpbusndivnm,
- operqtyyoy '业务量同比',
- operqtymom '业务量环比',
- rvnamtyoy '业务收入同比',
- rvnamtmom '业务收入环比',
- MonOperQty/100000000 as '业务量',
- MonOperRvnAmt/100000000 as '收入'
- from TB_FCT_SUM_DET_Mon a
- join (select max(StatsMt) as maxStatsMt from TB_FCT_SUM_DET_Mon) a1 on a1.maxStatsMt = a.StatsMt
- join tb_prt_cporg_all b on b.ctycporgcd=a.CpOrgCd
- join (select distinct cpbusndivcd, cpbusndivnm from dash.tb_cde_cpbusntyp) c on c.cpbusndivcd = a.PostBusnTypCd
- where b.ctysignnm='${sf}'" ))}
复制代码
|