You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Something off in SQL expression for criteria

40
Views
2
Comments
edited Jun 8, 2016 4:27PM in General Transactional Reporting (OTBI) 2 comments

Summary

Trying to capture last month's data

Content

The report functions with the expressions below; however, It doesn't seem to actually capture the last day of the previous month. I run the data for May and know there are results for 5/31 but only captures up to 5/29. What is wrong with the expressions. The Beginning of Previous Month expression seems to capture from 5/2 and I have verified that is correct.

Beginning of Previous Month

TIMESTAMPADD(SQL_TSI_MONTH, -1, TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE) * -(1) + 1, CURRENT_DATE))

End of Previous Month

TIMESTAMPADD(SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH(CURRENT_DATE) * -(1) + 1, CURRENT_DATE))

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!