>=sysdate-30 business day's data pick in oracle -
i need pick sysdate- 30 business days data table test.
when doing select * test cre_d>=sysdate-30;
it include saturday,sunday , holidays if any.i want pick sysdate- 30 business days(idealy sysdate-38 because 4 weekend came in week not looks correct because holidays may came , sysdate-38 should change sysdate-39.)
kindly suggest best way doing this.thanks!
create table t_tb select sysdate-level dt dual connect level < 50;
select to_char(dt,'d'), dt t_tb to_char(dt,'d') between 2 , 6and rownum <= 30
is want?
Comments
Post a Comment