| 发表于:2007-01-20 17:35:287楼 得分:0 |
我的意思是如果符合条件的记录存在就显示符合条件的记录,如果没有符合条件的记录则显示自己指定的字符。 如果用case,能不能这样写: case(exists(select csid from approve_currentstep where ceid=approve_stable.eid and cpassed=0)) when true then (select csid from approve_currentstep where ceid=approve_stable.eid and cpassed=0) when false then '无记录 ' end | | |
|