我设置一个数局窗口默认的格式(2栏)
1 2
3 4
5 6
我想改成
1 7
2 8
3 9
4
5
6
求大神解决方法
------解决方案--------------------
把数据改为 1、7、2、8、3、9、4、、5、、6的格式,再检索就好了,意思是数据需要重新处理一下
或者不要用N_up,用外部数据源,直接放两个列,自己把数据插进去。
------解决方案--------------------
根据楼上提示数据源可以设成以下形式:
select id from
(select number from master..spt_values
where [type]='P' and number<:rowcount*:n_up)t2
left join (
select id,name from (
select 1 as id,'' as name union all
select 2 as id,'' as name union all
select 3 as id,'' as name union all
select 4 as id,'' as name union all
select 5 as id,'' as name union all
select 6 as id,'' as name union all
select 7 as id,'' as name union all
select 8 as id,'' as name union all
select 9 as id,'' as name union all
select 10 as id,'' as name) t1)t1 on (t1.id-1)=t2.number
order by number%:rowcount,number
SQLServer数据库,rowcount表示行数此例中为6,n_up表示为列数此例中为2
结果:
