当前位置:首页 > 开发 > 数据库 > 正文

造假的周数。并去除重复的记录(2)

发表于: 2011-03-27   作者:alafqq   来源:转载   浏览:
c C++ C#
摘要: with w as(select to_number(to_char(a3,'WW') ,'fm09')w from one),w1 as(select ((select min(w) from w)+level-1)*7+to_date('20110101','YYYYMMDD') -to_number(to_char(to_date('20110101','YYYYMMDD'),'D

with w as(
select to_number(to_char(a3,'WW') ,'fm09')w from one),
w1 as(select ((select min(w) from w)+level-1)*7+to_date('20110101','YYYYMMDD') 
-to_number(to_char(to_date('20110101','YYYYMMDD'),'D') ,'fm0')L1
from dual connect by level<=(select max(w) from w)-(select min(w) from w)+2)
--select * from w1
,w2 as(select nvl(to_char(one.a3,'YYYYMMDD'),'/')a,to_char(L1+1,'YYYYMMDD')||'~'||to_char(L1+7,'YYYYMMDD')b,
decode(to_char(one.a3,'YYYYMMDD'),NULL,'未','已')||'报'c
from one right join w1 on one.a3 between L1+1 and L1+7 order by b)
select rownum,a,b,c from w2;

造假的周数。并去除重复的记录(2)

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号