CREATE VIEW v
AS
   select ID,case when col3='Y' then cast(col1 as float)/10 else col1 end as COL1,col2,col3 from testYN 

解决方案 »

  1.   

    可以,直接建
    create view v1
    as
    select ID,case when col3='Y' then cast(col1 as float)/10 else col1 end,col2,col3 from testYN 
      

  2.   

    union 也可以写到create view里面
      

  3.   


    在试图页里面,也可以用语句呀。CREATE VIEW V_Test 
    AS 
      select ID,case when col3='Y' then cast(col1 as float)/10 else col1 end as COL1,col2,col3 from testYN Go
    就可以了。
    没有什么问题的
      

  4.   


    报错信息:查询设计器不支持 CASE SQL 构造。
      

  5.   

    你不会是连接的SQL Server Mobile