on 09-21-2015 2:25 PM
Hi All,
Can anyone help me in getting the currentdate data in the report, or even yesterdays data.
I am using SQL Server 2008, SAP BO 4.0 SP3.
I have written trunc(getdate()) in select clause, but it showing error as cannot prepare the statement, parse failed.
Please help me in this.
Thanks a lot in advance,
Santhosh.
Over on the BOB Forum, I've created a sticky topic that explains all about relative dates and how to create them.
They will not parse in the universe design tool or IDT because the parsing algorithm looks for table.object or owner.function type constructs. getdate() in SQL Server and sysdate in Oracle don't have these constructs and therefore fail to parse. That doesn't matter, just build them - I'd recommend building all the objects listed for SQL Server in the link below. They will work fine in queries when used with any table-based object. They are handy to use when scheduling reports.
The sticky topic:
http://www.forumtopics.com/busobj/viewtopic.php?t=152613
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhosh,
I see that you use trunc function and I assume that you expect it to remove the time component of the getdate() function. You could achieve that in SQL Server using many methods. You can read this article - http://stackoverflow.com/questions/1177449/best-approach-to-remove-time-part-of-datetime-in-sql-serv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use these syntax while creating current and yesterday dates in universe objects.
Current date Object=GETDATE()
yesterday Date Object=DATEADD(d,-1,GETDATE())
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to create two objects in universe.One for current date and one for yesterday date.
getdate() will not parse in the universe but it will work in the report.
After that in the webi report query filter you can add the condition like
Created date is equal to Current date object.
With this your report will fetch the data for current date only.
or create predefined condition in universe .
Amit
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.