-
asda 数据小白Lv1
发表于2022-9-30 17:42
悬赏10
已解决
楼主
ABI 5.2.2
在数据集中,select 某个需要count的字段,
语句如下:
select name, dw_name,
count( case when time between <#=@start#> and <#@end> then time end) as bz_time_ct ,
count( case when time between <#=od(datetostr(@start),'d-1')#> and <#od(datetostr(@start), ' d-7')#> then time end) as bz_time_ct
from user_info;
这里的参数 是分析报表中的两个时间参数组件,请问一下,是否有办法把参数值传到 这个between 条件中去?
表中的一些字段:
user_no, name, dw_name, tq_id, tq_name, time
在数据集中,select 某个需要count的字段,
语句如下:
select name, dw_name,
count( case when time between <#=@start#> and <#@end> then time end) as bz_time_ct ,
count( case when time between <#=od(datetostr(@start),'d-1')#> and <#od(datetostr(@start), ' d-7')#> then time end) as bz_time_ct
from user_info;
这里的参数 是分析报表中的两个时间参数组件,请问一下,是否有办法把参数值传到 这个between 条件中去?
表中的一些字段:
user_no, name, dw_name, tq_id, tq_name, time
3个回答
您是准备在主题集下根据sql语句建立主题表嘛,在sql主题表里传参需要在下方添加参数。可参考以下截图
两包辣条约吗 发表于 2022-10-8 09:52
您是准备在主题集下根据sql语句建立主题表嘛,在sql主题表里传参需要在下方添加参数。可参考以下截图
...
是的,是因为我没有加引号,加上引号之后就成功了,下面的参数控制可以不写,报表那边会传递过来的