Hello Friend I designed my Universe (SQL Data base) with below codes for current month , quarter etc. But it is throwing the below error
Only Current Date is working but rest are not working . Please suggest what need to be corrected , can u tell me if we can remove the time from these date fields or not required
Current Day
Administrator.SUPPORT_INCIDENTS.ENTRY_TIME = GETDATE()
Yesterday
Administrator.SUPPORT_INCIDENTS.ENTRY_TIME = DATEADD(d,-1,GETDATE())
Current Year
Administrator.TRANSACTIONS.EXPECTED_CLOSE between DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0) and DATEADD(ms,-3,DATEADD(yy,0,DATEADD(yy,DATEDIFF(yy,0,GETDATE())+1,0)))
Previous Year
Administrator.TRANSACTIONS.EXPECTED_CLOSE between DATEADD(yy,-1,DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0)) and DATEADD(ms,-3,DATEADD(yy,0,DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0)))
Current Month
Administrator.SUPPORT_INCIDENTS.ENTRY_TIME between DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0) and DATEADD(ms,- 3,DATEADD(mm,0,DATEADD(mm,DATEDIFF(mm,0,GETDATE())+1,0)))
Surpise the way current quarter works in my universe is as below
'Q'||to_char(Administrator.TRANSACTIONS.EXPECTED_CLOSE,'Q')||to_char(Administrator.TRANSACTIONS.EXPECTED_CLOSE,'YYYY')='Q'||to_char(sysdate(),'Q')||to_char(sysdate(),'YYYY')
can u tell what is this and how i can correct the other filters like current month, current week etc
Please help me asap
Thanks
soniya
[Moderator Edit: Added code formatting. Removed unnecessary blank lines - Andreas]
soniyakaren (BOB member since 2009-07-21)