2013-01-07 50 views
0

蒙上了布爾值的字符串我有一個這樣的查詢:如何使用BIRT

select myId, myName, myBoolean from myTable 

我希望得到一個BIRT表:

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

回答

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