数据集代码如下:
select tcom4,tcomname4,dwm_sdate,dwm_prem
, <Enddate>?{Enddate} </Enddate> as mydate
from dwm_prem_day
where 1 = 1
<Begdate> and dwm_sdate>= ?{Begdate} </Begdate>
<Enddate> and dwm_sdate<= ?{Enddate} </Enddate>
谢谢,搞定了 ,可以放在select里,但要指定类型,并且把参数把字段包起来
select tcom4,tcomname4,dwm_sdate,dwm_prem
,<Enddate> case when to_char(a.dwm_sdate,'yyyy-Q') = to_char(cast (?{Enddate} as date),'yyyy-Q') then a.dwm_prem else 0 end </Enddate> as quarter_prem
from dwm_prem_day
where 1 = 1
<Begdate> and dwm_sdate>= ?{Begdate} </Begdate>
<Enddate> and dwm_sdate<= ?{Enddate} </Enddate>
谢谢,搞定了 ,可以放在select里,但要指定类型,并且把参数把字段包起来
select tcom4,tcomname4,dwm_sdate,dwm_prem
,<Enddate> case when to_char(a.dwm_sdate,'yyyy-Q') = to_char(cast (?{Enddate} as date),'yyyy-Q') then a.dwm_prem else 0 end </Enddate> as quarter_prem
from dwm_prem_day
where 1 = 1
<Begdate> and dwm_sdate>= ?{Begdate} </Begdate>
<Enddate> and dwm_sdate<= ?{Enddate} </Enddate>