我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 排序 |
0
|
|