当使用两个变量参数据,报语法错误${month},receivemonth,不能这样写吗?

 select 

 a.workflowname,

round(avg(a.flowtime)/60/60/24,1) as avg_time  

from dwd.t_dwd_workflow_request_flowtime a

where   a.WORKFLOWTYPE<>'1'

' ${if(len(receivemonth) == 0," and A.createmonth='${month}' "," and createmonth = '" + receivemonth+ "'")} 

group by  a.workflowname

order by  round(avg(a.flowtime)/60/60/24,1) desc

严重:11:16:36 http-nio-8075-exec-4 ERROR [standard] 错误代码:11300001 数据集 [t_hp_workflow_type_time] 配置错误出现不支持的 SQL92 标记: 169

FineReport 用户jj4J79687 发布于 2022-11-3 11:22
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
1
Z4u3z1Lv6专家互助
发布于2022-11-3 11:23(编辑于 2022-11-3 11:23)

 select 

 a.workflowname,

round(avg(a.flowtime)/60/60/24,1) as avg_time  

from dwd.t_dwd_workflow_request_flowtime a

where   a.WORKFLOWTYPE<>'1'

${if(len(receivemonth) == 0," and A.createmonth='"+month+"' "," and createmonth = '" + receivemonth+ "'")} 

group by  a.workflowname

order by  round(avg(a.flowtime)/60/60/24,1) desc

  • 1关注人数
  • 176浏览人数
  • 最后回答于:2022-11-3 11:23
    请选择关闭问题的原因
    确定 取消
    返回顶部