摘要: 1 800022521 AAA(1256)(800022521)2 100876747 BBB(100876747)WITH a1 (COL1,COL2) AS(SELECT 1,'AAA(1256)(800022521)' UNION allSELECT 2,'BBB(... 阅读全文
posted @ 2015-02-28 14:22 emmy 阅读(168) 评论(0) 推荐(0) 编辑
摘要: with a as (select numb,name,row_number() over( partition by numb order by name desc) rowid from fenzu)select max(case when rowid=2 then name end) nam... 阅读全文
posted @ 2015-02-28 14:12 emmy 阅读(337) 评论(0) 推荐(0) 编辑
摘要: with a as(select *,row_number() over(partition by hyid order by jp desc) rowidfrom rtc)select a.hyid, max(case when a.rowid=1 then a.mc END) mc, max(c... 阅读全文
posted @ 2015-02-28 13:53 emmy 阅读(572) 评论(0) 推荐(0) 编辑