Unrecognized option: Date, case when trunc(sysdate-aafa.app_recvd_dt) <=4 then 4 days or less when trunc(sysdate-aafa.app_recvd_dt) between 5 and 7 then '5 to 7 days' when trunc(sysdate-aafa.app_recvd_dt) between 8 and 15 then '8 to 15 days' when trunc(sysdate-aafa.app_recvd_dt) between 16 and 21 then '16 to 21 days' when trunc(sysdate-aafa.app_recvd_dt) between 22 and 30 then '22 to 30 days' when trunc(sysdate-aafa.app_recvd_dt) between 31 and 45 then '31 to 45 days' when trunc(sysdate-aafa.app_recvd_dt)>45 then 'More than 45 days' end as span, rtapp.description AS Application
The query is running fine in SQL explorer but not in splunk.
Query...
...
...
...
...
..
...
case when trunc(sysdate-aafa.app_recvd_dt) <=4 then '4 days or less'
when trunc(sysdate-aafa.app_recvd_dt) between 5 and 7 then '5 to 7 days'
when trunc(sysdate-aafa.app_recvd_dt) between 8 and 15 then '8 to 15 days'
when trunc(sysdate-aafa.app_recvd_dt) between 16 and 21 then '16 to 21 days'
when trunc(sysdate-aafa.app_recvd_dt) between 22 and 30 then '22 to 30 days'
when trunc(sysdate-aafa.app_recvd_dt) between 31 and 45 then '31 to 45 days'
when trunc(sysdate-aafa.app_recvd_dt)>45 then 'More than 45 days' end as span,
...
...
..
..
.
.
.
.
.
.
.
The issue was spaces in aliases. Not at all related to error thrown
The issue was spaces in aliases. Not at all related to error thrown
if you get rid of the case statements, does it run? if not, there's probably something wrong elsewhere causing the issue to show up there? If it does, then maybe try one condition in the case, then the next and so on to see where it's getting upset exactly.
try using else
in case
command before end
.