AnsweredAssumed Answered

NSQL - Case statement implementation

Question asked by hwk on May 24, 2013
Latest reply on May 24, 2013 by another_martink
Hello CA community,

I am new to CA and just started with creating portlets.
I have created a SQL query with case statement. As expected it runs properly in SQL developer. When I try to process the same SQL in portlet it is not able to read the CASE statement.
Is there is a different tag which I need to include in the query which is specific to NSQL.

following is the NSQL which I am using in my portlet query.


select @select:dim:user_def:implied:timeslice:r.slice_object:key_type@,
@select:dim_prop:usre_def:implied:timeslice:r.slice_object:slice_object@
from (
select 'Assignment' slice_object, count(*) slice_count, slice_status
case
when slice_status=1 then ' slice may need to be updated'
when slice_status =2 then 'in process'
end time_slice_status_desc

from prassignment
where slice_status in (1,2)
group by slice_status

union

select 'Availability' slice_object, count(*) slice_count, slice_status
case
when slice_status=1 then ' slice needs update'
when slice_status=2 then ' in process'
end time_slice_status_desc

from prj_resources
where slice_status in (1,2)
group by slice_status

) r
where @filter@




resolution needed at the earlier.
appreciate immediate guidance.

Thanks.

Outcomes