如何使用BIRT将布尔值强制转换为字符串

时间:2013-01-07 14:47:41

标签: sql eclipse birt

我有这样的查询:

select myId, myName, myBoolean from myTable

我希望得到一张BIRT表:

if myBoolen is true, print `smart` else print `sorry you're ...`

1 个答案:

答案 0 :(得分:1)

select myId, 
       myName, 
       case when myBoolean = 1 
            then 'smart' 
            else 'sorry ...'  
       end
from myTable