Oracle返回星期幾的函數

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)

?

? 版權聲明
THE END
喜歡就支持一下吧
點贊6 分享