|
最佳回答 |
0
|
ColdmanLv6高级互助发布于2020-10-29 11:21
|
${if(date_type == 1,"前面的SQL"+year+"group by XXX","第二段SQL"+year+"group by XXX")}
|
|
|
|
最佳回答 |
0
|
zsh331Lv8专家互助发布于2020-10-29 11:18(编辑于 2020-10-29 11:44)
|
|
|
|
|
最佳回答 |
0
|
luckybaiLv4初级互助发布于2020-10-29 11:19
|
类似于这样就行,可以任意几个变量 ${if(len(guzhanglx) == 0,"","and e.故障类型 in ('" + guzhanglx + "')")}
|
|
|
|
最佳回答 |
0
|
snrtuemcLv8专家互助发布于2020-10-29 11:20
|
${if(date_typr="1","你的sql"+year+"XXX","")}
|
|
|
|
最佳回答 |
0
|
shirokoLv6资深互助发布于2020-10-29 11:25(编辑于 2020-10-29 11:25)
|
${
if(date_type=1,"select created_quarter as month_quarter from scmmonitor.sr_st where created_year =
'"+year+"'
group by created_quarter ","select created_month as month_quarter from scmmonitor.sr_st where created_year = '"+year+"' group by created_month ")}
|
|
|