作者:绿色风
分类:
时间:2022-08-17
浏览:193
楼主 wudixin96 |
Q:EXCEL中能不能用SQL做个简单的万年历呢?A:请看- transform first(日) select null from (select CHOOSE(WEEKDAY(日期),"日","一","二","三","四","五","六") as 星期,datepart("ww",日期) as 周,日 FROM (select (select f1 from [sheet1$d1:d1])&"/"&日&"/"&(select f1 from [sheet1$b1:b1]) as 日期,日 from (
- select 1 as 日 from [Sheet1$b1:b1] union
- select 2 from [Sheet1$b1:b1] union
- select 3 from [Sheet1$b1:b1] union
- select 4 from [Sheet1$b1:b1] union
- select 5 from [Sheet1$b1:b1] union
- select 6 from [Sheet1$b1:b1] union
- select 7 from [Sheet1$b1:b1] union
- select 8 from [Sheet1$b1:b1] union
- select 9 from [Sheet1$b1:b1] union
- select 10 from [Sheet1$b1:b1] union
- select 11 from [Sheet1$b1:b1] union
- select 12 from [Sheet1$b1:b1] union
- select 13 from [Sheet1$b1:b1] union
- select 14 from [Sheet1$b1:b1] union
- select 15 from [Sheet1$b1:b1] union
- select 16 from [Sheet1$b1:b1] union
- select 17 from [Sheet1$b1:b1] union
- select 18 from [Sheet1$b1:b1] union
- select 19 from [Sheet1$b1:b1] union
- select 20 from [Sheet1$b1:b1] union
- select 21 from [Sheet1$b1:b1] union
- select 22 from [Sheet1$b1:b1] union
- select 23 from [Sheet1$b1:b1] union
- select 24 from [Sheet1$b1:b1] union
- select 25 from [Sheet1$b1:b1] union
- select 26 from [Sheet1$b1:b1] union
- select 27 from [Sheet1$b1:b1] union
- select 28 from [Sheet1$b1:b1] union
- select 29 from [Sheet1$b1:b1] union
- select 30 from [Sheet1$b1:b1] union
- select 31 from [Sheet1$b1:b1])
- ) where isdate(日期)
- ) group by 周 pivot "星期"&星期 in ("星期日","星期一","星期二","星期三","星期四","星期五","星期六")
s.gif
|
2楼 zzmxy |
牛人啊,當年能做出來的兩個人中, 其中一位就是無敵哥哥啊~~~
|
3楼 君柳 |
佩服的WTTD啊 |
4楼 wise |
 佩服**哥 |
5楼 raulerini |
崇拜ing~~~。
|
6楼 海洋之星 |
厉害啊,学习学习 |
7楼 wjc2090742 |
厉害,学习了,好题目。 |
8楼 水星钓鱼 |
精华 |
9楼 yanzezhou |
看不懂 |
10楼 海洋之星 |
厉害啊,学习学习 |
11楼 xiongxh |
星期会随月份变吗 |
免责声明
有感于原ExcelTip.Net留存知识的价值及部分知识具有的时间限定性因素,
经与ExcelTip.Net站长Apolloh商议并征得其同意,
现将原属ExcelTip.Net的知识帖采集资料于本站点进行展示,
供有需要的人士查询使用,也慰缅曾经的论坛时代。
所示各个帖子的原作者如对版权有异议,
可与本人沟通提出,或于本站点留言,我们会尽快处理。
在此,感谢ExcelTip.Net站长Apolloh的支持,感谢本站点所有人**绿色风(QQ:79664738)**的支持与奉献,特此鸣谢!
------本人网名**KevinChengCW(QQ:1210618015)**原ExcelTip.Net总版主之一