CASE expression returns errors
11:35 07 Jul 2012

I have select CASE expression in DB2:

case when actualfinish is not null then dec (( timestampdiff(
  4, 
  char(actualfinish - reportdate))/60.00),10,2)
else 'not'
 end

It returns me error. If I delete ELSE part there is no error and calculation is done.

    case when actualfinish is not null then dec (( timestampdiff(
      4, 
      char(actualfinish - reportdate))/60.00),10,2)
end

If I change THEN part to something like

  case when actualfinish is not null then 'Yes'
    else 'not'
     end

also there is no error.

But for my complete SQL query - can't find an error.

sql case