Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Query with function on SYSDATE not work in BI Publisher Reports

Summary
Query with function on SYSDATE not work in BI Publisher Reports
Content
Hi,
I have a problem with function for SYSDATE, where this query work on SQL Developer but not work in BI Publisher. I can said more: query works fine in BI Publisher in Data model for "Save like sample data" but not work when I generate report from this data model.
function:
--description: I want to take from year before today and take from three months before that date.
in clause WHERE TO_CHAR(table.UNLOADINGDATE, 'YYYY-MM') >= TO_CHAR((ADD_MONTHS((TO_DATE((SUBSTR(TO_CHAR(SYSDATE, 'YYYY'), 0, 4)-1)) || '-' || TO_CHAR(SYSDATE, 'MM-DD')), -3)), 'YYYY-MM')
Can anyone help?
Answers
-
I don't understand need to break the SYSDATE in the YYYY and MM-DD format because if you say "want to take from year before today and take from three months before that date"
means 15 months before today's date?
Can we directly try add_months(sysdate,-15)
0 -
Brajesh thanks, of course you are right! I don't know why I tried to do my life harder.
0