|
发表于 2022-4-18 14:17
来自手机
|
显示全部楼层
select * from 横排数据转换成竖便于打印固定资产标签 limit 3; cli_one_dim~横排数据转换成竖便于打印固定资产标签~1; create temp table aa as select row_number() over (partition by 属性) 序,iif(属性%2=0,0,1) 列,* from 横排数据转换成竖便于打印固定资产标签union; create temp table bb as select `1` 标签,数量 内容 from aa where 列=0 order by 属性 COLLATE NATURAL_CMP,序 desc; create temp table cc as select `1` 标签2,数量 内容2 from aa where 列=1 order by 属性 COLLATE NATURAL_CMP,序 desc; create temp table dd as select rowid old_rowid,* from bb; create temp table ee as select rowid old_rowid,* from cc; select 标签,内容,标签2,内容2 from dd left join ee using(old_rowid); |
|