select replace(I_AutoRunMonitor,'0','不自动运行') from T_Interface
这样是可以     0 替换为 '不自动运行'
可是我还要用   1 替换为 '自动运行'
               2 替换为 '以后设置'       这个怎么写呢!

解决方案 »

  1.   

    select 
        case I_AutoRunMonitor 
          when 0 then '不自动运行'
          when 1 then '自动运行'  
          when 2 then '以后设置'  
        end
    from T_Interface
      

  2.   

    select 
    case I_AutoRunMonitor 
    when '0' then '不自动运行'
    when '1' then '自动运行'  
    when '2' then '以后设置'  
    end
    from T_Interface
      

  3.   

    select replace(replace(replace(I_AutoRunMonitor,'0','不自动运行'),'1','自动运行'),'2','以后设置') 
    from T_Interface
      

  4.   

    select replace(replace(replace(I_AutoRunMonitor,'0','不自动运行'),'1','自动运行'),'2','以后设置')
    from T_Interface
      

  5.   

    dobear_0922(do熊) ( ) 信誉:100  2007-09-04 14:09:11  得分: 0  
     
     
       select replace(replace(replace(I_AutoRunMonitor,'0','不自动运行'),'1','自动运行'),'2','以后设置') 
    from T_Interface  
     ----------------------------------------这个Replace好方法,记得在Access中的SQL语句一定要这样写的!!