|
楼主的题目表达不清楚。那个a1单元格的1只能作为第一列标题,不可能即作列标题,又作行标题。所以楼主给出的样表有些问题。不过,我猜大致意思是要求2-14列的数据汇总。引入外部查询,SQL语句如下:
select [1],"2" as 目,[2] as 值 from [源数据$a1:n34] union all
select [1],"3" as 目,[3] as 值 from [源数据$a1:n34] union all
select [1],"4" as 目,[4] as 值 from [源数据$a1:n34] union all
select [1],"5" as 目,[5] as 值 from [源数据$a1:n34] union all
select [1],"6" as 目,[6] as 值 from [源数据$a1:n34] union all
select [1],"7" as 目,[7] as 值 from [源数据$a1:n34] union all
select [1],"8" as 目,[8] as 值 from [源数据$a1:n34] union all
select [1],"9" as 目,[9] as 值 from [源数据$a1:n34] union all
select [1],"10" as 目,[10] as 值 from [源数据$a1:n34] union all
select [1],"11" as 目,[11] as 值 from [源数据$a1:n34] union all
select [1],"12" as 目,[12] as 值 from [源数据$a1:n34] union all
select [1],"13" as 目,[13] as 值 from [源数据$a1:n34] union all
select [1],"14" as 目,[14] as 值 from [源数据$a1:n34] |
|