select case when status ='1' then '完好' else '报废' end
from  ..
where ..

解决方案 »

  1.   

    select case when status =1 then '完好' else '报废' end 列别名 from  表
      

  2.   

    系统提示:The Query Designer does not support the CASE SQL construct.
    好象不支持这种写法。
      

  3.   

    select case status when 1 then '完好' else '报废' end as 状态 from tablename
      

  4.   

    事interbase啊 好像interbase不支持case的那这样alter table table add cid int identity(1,1)select status
    from 
    (select cid, '完好'  status from #t where status=1
    union all
    select cid ,'报废'  status from #t where status<>1) a
    order by a.cid
      

  5.   

    alter talbe table drop column cid
      

  6.   


    interbase:select status
    from 
    (select cid, '完好'  status from #t where status=1
    union all
    select cid ,'报废'  status from #t where status<>1) a
    order by a.cidSqlserver:
    select case when status =1 then '完好' else '报废' end 列别名 from  表