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

Oracle返回星期几的函数

WBOY
Release: 2016-06-07 17:57:57
Original
1988 people have browsed it

做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)

 


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template