on 10-01-2013 7:01 PM
Hi,
I wanna know if is possible create a filter that select the last day of the past month int he IDT or I need to create the function in the database and insert the result of the function in an filter.
I have some webi reports that must be updated and sent through email every 1 of every month, showing information about the past month.
If someone have knows another way to do this, let me know please
Thanks in advance
It depends what DBMS you use.
For Oracle, the SQL definition of the object would be:
trunc(sysdate,'mm')-1
SQL Server would be a bit more of a mouthful:
dateadd(d,-1,cast(convert(char(7),getdate(),23)+'-01' as datetime))
Please note that the object will not parse because it is not associated with a table. This won't matter so long as you use it with a table based object in your queries. If someone suggests you associate it with a table to get it to parse, don't. You will always have that table in every query that you run with that object, which could produce erroneous results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.