年龄设置单元格筛选之后就不现实了

我sql是这样的,然后需要再单元格里边  给人数  后边加个人字,然后比如  24阶段的就条件属性选择1,然后再加上超链接。  可是这样之后,手机端决策报表,直接就不现实了,成了红白的了,都不知道到底哪里出问题了。    10.0版本的。这是什么bug………………

select * from (

SELECT 

case when age <= 24 then 1

when age >= 25 and age <= 30 then 2

when age >= 31 and age <= 35 then 3

when age >= 36 and age <= 40 then 4

when age >= 41 then 5

end as 排序

,

case when age <= 24 then '24岁以下'

when age >= 25 and age <= 30 then '25-30岁'

when age >= 31 and age <= 35 then '31-35岁'

when age >= 36 and age <= 40 then '36-40岁'

when age >= 41 then '41岁以上'

end as 阶段

,count(*)  as  人数

from dbo.VIEW_A01  

where SIGNED='2' and DELETED='0' and J01_JTYPE='01'

group by 

case when age <= 24 then 1

when age >= 25 and age <= 30 then 2

when age >= 31 and age <= 35 then 3

when age >= 36 and age <= 40 then 4

when age >= 41 then 5

end,

case when age <= 24 then '24岁以下'

when age >= 25 and age <= 30 then '25-30岁'

when age >= 31 and age <= 35 then '31-35岁'

when age >= 36 and age <= 40 then '36-40岁'

when age >= 41 then '41岁以上'

end 

) tt

order by   排序

FineReport yzm335528 发布于 2024-8-30 16:36
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
CD20160914Lv8专家互助
发布于2024-8-30 17:01

这样呢,然后你是如何设置的,最终如何了?想如何?你上面的表达真是理解不到!!不知道是打拼音错别字太多,还是本来就是表达有问题

select 

tt.排序,

tt.阶段,

tt.人数

 from (

SELECT 

case when age <= 24 then 1

when age >= 25 and age <= 30 then 2

when age >= 31 and age <= 35 then 3

when age >= 36 and age <= 40 then 4

when age >= 41 then 5

end as 排序,

case when age <= 24 then '24岁以下'

when age >= 25 and age <= 30 then '25-30岁'

when age >= 31 and age <= 35 then '31-35岁'

when age >= 36 and age <= 40 then '36-40岁'

when age >= 41 then '41岁以上'

end as 阶段,

count(*)  as  人数

from dbo.VIEW_A01  

where SIGNED='2' 

and DELETED='0' 

and J01_JTYPE='01'

group by 

case when age <= 24 then 1

when age >= 25 and age <= 30 then 2

when age >= 31 and age <= 35 then 3

when age >= 36 and age <= 40 then 4

when age >= 41 then 5

end,

case when age <= 24 then '24岁以下'

when age >= 25 and age <= 30 then '25-30岁'

when age >= 31 and age <= 35 then '31-35岁'

when age >= 36 and age <= 40 then '36-40岁'

when age >= 41 then '41岁以上'

end 

) tt

order by tt.排序

  • 2关注人数
  • 96浏览人数
  • 最后回答于:2024-8-30 17:01
    请选择关闭问题的原因
    确定 取消
    返回顶部