Home >Database >Mysql Tutorial >Oracle返回星期几的函数

Oracle返回星期几的函数

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:57:572006browse

做Oracle报表时遇到需求滚动展示周数据,除掉周六和周天的数值,简单记录下。 在sql语句where条件中添加:to_char(d1.d_day,d)not in(1,7)--去掉周六周日两天 现有时间维表d_timeday,执行sql: select * from d_timeday d where to_char(d.d_day,d) not in(1

做Oracle报表时遇到需求滚动展示周数据,除掉周六和周天的数值,简单记录下。

在sql语句where条件中添加:to_char(d1.d_day,'d')not in(1,7)--去掉周六周日两天

现有时间维表d_timeday,执行sql:

select * from d_timeday d where to_char(d.d_day,'d') not in(1,7)

 


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn