update bhk set 零售价=round(进价/0.7,1) where 编号 from '644181103'to'644181118'
编号644181103,644181104,...,644181118止,有没有这样的函数哪?请高手指点

解决方案 »

  1.   

    between 644181103 and 644181118
      

  2.   

    update bhk set 零售价=round(进价/0.7,1) where CAST(编号 AS BIGINT) BETWEEN 644181103 AND 644181118
      

  3.   

    不转换直接比较应该也行SELECT * FROM  
    (SELECT '644181103' AS 'COL1'
    UNION ALL SELECT '644181104'
    UNION ALL SELECT '644181105'
    UNION ALL SELECT '644181118'
    UNION ALL SELECT '644181119'
    ) T
     where COL1 BETWEEN '644181103' AND '644181118' 
      

  4.   

    update bhk 
    set 零售价=round(进价/0.7,1) 
    where rtrim(编号) BETWEEN '644181103' AND '644181118'
      

  5.   

    update bhk set 零售价=round(进价/0.7,1) where 编号 BETWEEN '644181103' AND '644181118' 
      

  6.   

    如果编号为数值型,直接:
    update bhk set 零售价=round(进价/0.7,1) where 编号 between 644181103 and 644181118如果为字符型,建议把编号转为数值型再比较:
    update bhk set 零售价=round(进价/0.7,1) where cast(编号 as int) between 644181103 and 644181118
      

  7.   

    update bhk 
    set 零售价=round(进价/0.7,1) 
    where rtrim(编号) BETWEEN '644181103' AND '644181118'
    更新在在'644181103' 和'644181118'范围内的数据
      

  8.   

    update bhk 
    set 零售价=cast(进价/0.7 as decimal(14,2) 
    where 编号>='644181103' AND 编号<='644181118' 
    更新在在'644181103' 和'644181118'范围内的数据
      

  9.   


    update bhk set 零售价=round(进价/0.7,1) where 编号 between 644181103 and 644181118