【发布时间】:2012-07-07 19:03:11
【问题描述】:
您好,我在 DB2 中有 select CASE 语句:
case when actualfinish is not null then dec (( timestampdiff(
4,
char(actualfinish - reportdate))/60.00),10,2)
else 'not'
end
它返回错误。 如果我删除 ELSE 部分没有错误并且计算完成。
case when actualfinish is not null then dec (( timestampdiff(
4,
char(actualfinish - reportdate))/60.00),10,2)
end
如果我将 THEN 部分更改为类似
case when actualfinish is not null then 'Yes'
else 'not'
end
也没有错误。
但是对于我的完整 SQL 查询 - 找不到错误。 谢谢
【问题讨论】:
-
dec() 函数返回什么数据类型?