首页| 论坛| 消息
主题:解读oracle日历
cai发表于 2010-08-09 15:34
原贴地址: http://jackywood.itpub.net/post/1369/127565
sql如下:
select case
when (new_yweek = min(new_yweek)over(partition by mon order by new_yweek)) then
mon_name
else
null
end as month,
new_yweek as yweek,
row_number() over(partition by mon order by new_yweek) as mweek,
sum(decode(wday, '1', mday, null)) as sun,
sum(decode(wday, '2', mday, null)) as mon,
sum(decode(wday, '3', mday, null)) as tue,
sum(decode(wday, '4', mday, null)) as wed,
sum(decode(wday, '5', mday, null)) as thu
下一页 (1/4)
回帖(0):

全部回帖(0)»
最新回帖
收藏本帖
发新帖