SQL语句替换字段内容例子

SELECT REPLACE(SysFuncID,'7201','7204') ,
           CASE
          WHEN Flag=1 THEN REPLACE(funcname,'粉煤灰实验','矿粉实验') ELSE FuncName end ,
          CASE  
          WHEN Flag=3 THEN REPLACE(FuncDesc,'烧失量','密度')
          WHEN Flag=1 THEN REPLACE(FuncDesc,'粉煤灰实验','矿粉实验') ELSE FuncName end ,
          '7204' ,
          IsLeaf ,
          ButtonPos ,
          IsButton ,
          Icon ,
          CASE WHEN Flag=4 THEN REPLACE(URL,'Lab_ActiveInfo','Lab_Air2ActiveInfo')
          WHEN Flag=3 THEN REPLACE(URL,'Lab_BurntInfo','Lab_Air2Density')
          WHEN Flag=1 THEN REPLACE(URL,'Lab_AirReport','Lab_Air2Report')
          WHEN Flag=2 THEN REPLACE(URL,'Lab_AirOrigin','Lab_Air2Origin') end ,
          IsDisabled ,
          HandlerName ,
          HandlerFile ,
          Flag ,
          OrderNum ,
          Builder ,
          BuildTime ,
          Modifier ,
          ModifyTime ,
          Version ,
          Lifecycle FROM SysFunc WHERE ParentID='7201' AND SysFuncID NOT IN('720101','720102','720103','720104')

posted @ 2017-02-15 15:55  StarkSoft  阅读(1945)  评论(0编辑  收藏  举报