-2

How can I restrict the data of all the months based on Current day of month. Supposed day of month is 18 so all previous months will give me data only till 18th and not more than that in Obiee?

2 Answers2

0

You can use extract():

select t.*
from t
where extract(day from datecol) <= extract(day from sysdate);
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
  • The reason for the downvote is exactly the reason this was chosen as the "correct" answer: Not a single thought wasted whether it is also the appropriate answer. Writing code in OBI is in 99% of the cases the wrong approach since it should be the last resort, Not the first. An itch on your hand can be solved by cutting off the arm. Sure. – Chris Oct 23 '19 at 08:56
0

Why don't you have a server variable which represents CURRENT_MONTH rather than writing spaghetti code?

Well populated variables used across the whole environment eliminate a lot of redundant effort of manually writing things over and over and over in analyses.

https://gerardnico.com/dat/obiee/obis/server_variable

Chris
  • 2,706
  • 2
  • 13
  • 15